comparison 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
comparison
equal deleted inserted replaced
516:fc7ab6287598 520:52a431267315
6941 push(tmp); 6941 push(tmp);
6942 } 6942 }
6943 6943
6944 Label slow_case, done; 6944 Label slow_case, done;
6945 6945
6946 // x ?<= pi/4 6946 ExternalAddress pi4_adr = (address)&pi_4;
6947 fld_d(ExternalAddress((address)&pi_4)); 6947 if (reachable(pi4_adr)) {
6948 fld_s(1); // Stack: X PI/4 X 6948 // x ?<= pi/4
6949 fabs(); // Stack: |X| PI/4 X 6949 fld_d(pi4_adr);
6950 fcmp(tmp); 6950 fld_s(1); // Stack: X PI/4 X
6951 jcc(Assembler::above, slow_case); 6951 fabs(); // Stack: |X| PI/4 X
6952 6952 fcmp(tmp);
6953 // fastest case: -pi/4 <= x <= pi/4 6953 jcc(Assembler::above, slow_case);
6954 switch(trig) { 6954
6955 case 's': 6955 // fastest case: -pi/4 <= x <= pi/4
6956 fsin(); 6956 switch(trig) {
6957 break; 6957 case 's':
6958 case 'c': 6958 fsin();
6959 fcos(); 6959 break;
6960 break; 6960 case 'c':
6961 case 't': 6961 fcos();
6962 ftan(); 6962 break;
6963 break; 6963 case 't':
6964 default: 6964 ftan();
6965 assert(false, "bad intrinsic"); 6965 break;
6966 break; 6966 default:
6967 } 6967 assert(false, "bad intrinsic");
6968 jmp(done); 6968 break;
6969 }
6970 jmp(done);
6971 }
6969 6972
6970 // slow case: runtime call 6973 // slow case: runtime call
6971 bind(slow_case); 6974 bind(slow_case);
6972 // Preserve registers across runtime call 6975 // Preserve registers across runtime call
6973 pusha(); 6976 pusha();