diff options
| author | grischka <grischka> | 2011-08-06 16:08:03 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2011-08-06 16:11:56 +0200 |
| commit | f115c1234692364f3f097a416e4a6e21abf0cbf3 (patch) | |
| tree | de821f5bdb8b1dafa4bf42070fb170e2d73998e1 /tccgen.c | |
| parent | 81cd0cf6fdcbdd1d38c1a9f317d04fdac287a1e5 (diff) | |
| download | tinycc-f115c1234692364f3f097a416e4a6e21abf0cbf3.tar.gz tinycc-f115c1234692364f3f097a416e4a6e21abf0cbf3.tar.bz2 | |
x86-64: fix flags and zero-pad long doubles
This fixes a bug introduced in commit
8d107d9ffd8126d82b1c56be47431a6bcef39f08
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.
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |
