< prev index next >

src/cpu/x86/vm/macroAssembler_x86.cpp

Print this page

        

@@ -969,10 +969,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) {

@@ -5945,38 +5954,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':
< prev index next >