Fix type/r/r2 confusion differently
commitfb22e0c12dbbf8907253a9e05a4433542d3c82d1
authorMichael Matz <matz@suse.de>
Tue, 10 Dec 2019 16:49:04 +0000 (10 17:49 +0100)
committerMichael Matz <matz@suse.de>
Tue, 10 Dec 2019 16:49:04 +0000 (10 17:49 +0100)
tree1a8dfe83d1971649ea6ab4fd90f0bc413684a286
parentac2a61d1b37b32a7c0bb5caac031f13463c5f500
Fix type/r/r2 confusion differently

on i386 111_conversion.c breaks when save_reg_upstack isn't careful
about r2 and type mismatches.  The bcheck patches fixed this by
enlarging the stack slot beyond the natural type, this variant simply
avoids saving the second register is the type indicates that it isn't
needed.

Adds also a comment how this should ideally work, namely that type
and r/r2 entries in the vstack are consistent.  In the 111_conversion
testcase it's specifically gen_cast via gen_cvt_ftoi that breaks
this, but there more general code broken as well, so that would deserve
a careful fixup based on some additional asserts.
tccgen.c