< prev index next >
src/cpu/x86/vm/macroAssembler_x86.cpp
Print this page
@@ -970,10 +970,19 @@
lea(rscratch1, src);
addss(dst, Address(rscratch1, 0));
}
}
+void MacroAssembler::addpd(XMMRegister dst, AddressLiteral src) {
+ if (reachable(src)) {
+ Assembler::addpd(dst, as_Address(src));
+ } else {
+ lea(rscratch1, src);
+ Assembler::addpd(dst, Address(rscratch1, 0));
+ }
+}
+
void MacroAssembler::align(int modulus) {
align(modulus, offset());
}
void MacroAssembler::align(int modulus, int target) {
@@ -5730,38 +5739,26 @@
tmp = rbx;
push(tmp);
}
Label slow_case, done;
-
+ if (trig == 't') {
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);
switch(trig) {
case 's':
@@ -5790,11 +5787,10 @@
if (tmp != noreg) {
pop(tmp);
}
}
-
// Look up the method for a megamorphic invokeinterface call.
// The target method is determined by <intf_klass, itable_index>.
// The receiver klass is in recv_klass.
// On success, the result will be in method_result, and execution falls through.
// On failure, execution transfers to the given label.
< prev index next >