Mercurial > hg > graal-compiler
diff src/cpu/x86/vm/assembler_x86.cpp @ 520:52a431267315
6791168: Fix invalid code in bytecodeInterpreter that can cause gcc ICE
Summary: Fix compilation errors from latest gcc in CC_INTERP including offending missing void* cast.
Reviewed-by: xlu
author | coleenp |
---|---|
date | Tue, 13 Jan 2009 14:41:44 -0500 |
parents | db4caa99ef11 |
children | 0fbdb4381b99 19962e74284f |
line wrap: on
line diff
--- a/src/cpu/x86/vm/assembler_x86.cpp Fri Jan 09 14:39:07 2009 -0500 +++ b/src/cpu/x86/vm/assembler_x86.cpp Tue Jan 13 14:41:44 2009 -0500 @@ -6943,29 +6943,32 @@ Label slow_case, done; - // x ?<= pi/4 - fld_d(ExternalAddress((address)&pi_4)); - fld_s(1); // Stack: X PI/4 X - fabs(); // Stack: |X| PI/4 X - fcmp(tmp); - jcc(Assembler::above, slow_case); - - // fastest case: -pi/4 <= x <= pi/4 - switch(trig) { - case 's': - fsin(); - break; - case 'c': - fcos(); - break; - case 't': - ftan(); - break; - default: - assert(false, "bad intrinsic"); - break; - } - jmp(done); + ExternalAddress pi4_adr = (address)&pi_4; + if (reachable(pi4_adr)) { + // x ?<= pi/4 + fld_d(pi4_adr); + fld_s(1); // Stack: X PI/4 X + fabs(); // Stack: |X| PI/4 X + fcmp(tmp); + jcc(Assembler::above, slow_case); + + // fastest case: -pi/4 <= x <= pi/4 + switch(trig) { + case 's': + fsin(); + break; + case 'c': + fcos(); + break; + case 't': + ftan(); + break; + default: + assert(false, "bad intrinsic"); + break; + } + jmp(done); + } // slow case: runtime call bind(slow_case);