x86-64: fix flags and zero-pad long doubles
This fixes a bug introduced in commit
8d107d9ffd
that produced wrong code because of interference between
0x10 bits VT_CONST and x86_64-gen.c:TREG_MEM
Also fully zero-pad long doubles on x86-64 to avoid random
bytes in output files which disturb file comparison.
This commit is contained in:
6
tccgen.c
6
tccgen.c
@ -709,8 +709,12 @@ ST_FUNC int gv(int rc)
|
||||
/* XXX: not portable yet */
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/* Zero pad x87 tenbyte long doubles */
|
||||
if (size == LDOUBLE_SIZE)
|
||||
if (size == LDOUBLE_SIZE) {
|
||||
vtop->c.tab[2] &= 0xffff;
|
||||
#if LDOUBLE_SIZE == 16
|
||||
vtop->c.tab[3] = 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
ptr = section_ptr_add(data_section, size);
|
||||
size = size >> 2;
|
||||
|
||||
Reference in New Issue
Block a user