comparison tcc.c @ 543:f5e9e8615e47

Michael Lewis had a problem with floating point on Windows, suggested a minor tweak to fix it which should be a NOP on Linux.
author Rob Landley <rob@landley.net>
date Fri, 14 Dec 2007 19:57:38 -0600
parents eca8c8d45d55
children 7fb1cf0d8a84
comparison
equal deleted inserted replaced
542:eca8c8d45d55 543:f5e9e8615e47
4152 int v; 4152 int v;
4153 v = vtop->r & VT_VALMASK; 4153 v = vtop->r & VT_VALMASK;
4154 #ifdef TCC_TARGET_I386 4154 #ifdef TCC_TARGET_I386
4155 /* for x86, we need to pop the FP stack */ 4155 /* for x86, we need to pop the FP stack */
4156 if (v == TREG_ST0) { 4156 if (v == TREG_ST0) {
4157 o(0xd9dd); /* fstp %st(1) */ 4157 o(0xd8dd); /* fstp %st(1) */
4158 } else 4158 } else
4159 #endif 4159 #endif
4160 if (v == VT_JMP || v == VT_JMPI) { 4160 if (v == VT_JMP || v == VT_JMPI) {
4161 /* need to put correct jump if && or || without test */ 4161 /* need to put correct jump if && or || without test */
4162 gsym(vtop->c.ul); 4162 gsym(vtop->c.ul);