< prev index next >

src/cpu/x86/vm/macroAssembler_x86.hpp

Print this page




 430 
 431   // Floating-point comparison for Java
 432   // Compares the top-most stack entries on the FPU stack and stores the result in dst.
 433   // The arguments are in reversed order on the stack (i.e., top of stack is first argument).
 434   // (semantics as described in JVM spec.)
 435   void fcmp2int(Register dst, bool unordered_is_less);
 436   // Variant of the above which allows y to be further down the stack
 437   // and which only pops x and y if specified. If pop_right is
 438   // specified then pop_left must also be specified.
 439   void fcmp2int(Register dst, bool unordered_is_less, int index, bool pop_left, bool pop_right);
 440 
 441   // Floating-point remainder for Java (ST0 = ST0 fremr ST1, ST1 is empty afterwards)
 442   // tmp is a temporary register, if none is available use noreg
 443   void fremr(Register tmp);
 444 
 445 
 446   // same as fcmp2int, but using SSE2
 447   void cmpss2int(XMMRegister opr1, XMMRegister opr2, Register dst, bool unordered_is_less);
 448   void cmpsd2int(XMMRegister opr1, XMMRegister opr2, Register dst, bool unordered_is_less);
 449 
 450   // Inlined sin/cos generator for Java; must not use CPU instruction
 451   // directly on Intel as it does not have high enough precision
 452   // outside of the range [-pi/4, pi/4]. Extra argument indicate the
 453   // number of FPU stack slots in use; all but the topmost will
 454   // require saving if a slow case is necessary. Assumes argument is
 455   // on FP TOS; result is on FP TOS.  No cpu registers are changed by
 456   // this code.
 457   void trigfunc(char trig, int num_fpu_regs_in_use = 1);
 458 
 459   // branch to L if FPU flag C2 is set/not set
 460   // tmp is a temporary register, if none is available use noreg
 461   void jC2 (Register tmp, Label& L);
 462   void jnC2(Register tmp, Label& L);
 463 
 464   // Pop ST (ffree & fincstp combined)
 465   void fpop();
 466 
 467   // Load float value from 'address'. If UseSSE >= 1, the value is loaded into
 468   // register xmm0. Otherwise, the value is loaded onto the FPU stack.
 469   void load_float(Address src);
 470 
 471   // Store float value to 'address'. If UseSSE >= 1, the value is stored
 472   // from register xmm0. Otherwise, the value is stored from the FPU stack.
 473   void store_float(Address dst);
 474 
 475   // Load double value from 'address'. If UseSSE >= 2, the value is loaded into
 476   // register xmm0. Otherwise, the value is loaded onto the FPU stack.
 477   void load_double(Address src);


 973   void libm_sincos_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx,
 974                         Register edx, Register ebx, Register esi, Register edi,
 975                         Register ebp, Register esp);
 976 
 977   void libm_reduce_pi04l(Register eax, Register ecx, Register edx, Register ebx,
 978                          Register esi, Register edi, Register ebp, Register esp);
 979 
 980   void libm_tancot_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx,
 981                         Register edx, Register ebx, Register esi, Register edi,
 982                         Register ebp, Register esp);
 983 
 984   void fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3,
 985                 XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
 986                 Register rax, Register rcx, Register rdx, Register tmp);
 987 #endif
 988 
 989   void increase_precision();
 990   void restore_precision();
 991 
 992 private:
 993 
 994   // call runtime as a fallback for trig functions and pow/exp.
 995   void fp_runtime_fallback(address runtime_entry, int nb_args, int num_fpu_regs_in_use);
 996 
 997   // these are private because users should be doing movflt/movdbl
 998 
 999   void movss(Address dst, XMMRegister src)     { Assembler::movss(dst, src); }
1000   void movss(XMMRegister dst, XMMRegister src) { Assembler::movss(dst, src); }
1001   void movss(XMMRegister dst, Address src)     { Assembler::movss(dst, src); }
1002   void movss(XMMRegister dst, AddressLiteral src);
1003 
1004   void movlpd(XMMRegister dst, Address src)    {Assembler::movlpd(dst, src); }
1005   void movlpd(XMMRegister dst, AddressLiteral src);
1006 
1007 public:
1008 
1009   void addsd(XMMRegister dst, XMMRegister src)    { Assembler::addsd(dst, src); }
1010   void addsd(XMMRegister dst, Address src)        { Assembler::addsd(dst, src); }
1011   void addsd(XMMRegister dst, AddressLiteral src);
1012 
1013   void addss(XMMRegister dst, XMMRegister src)    { Assembler::addss(dst, src); }
1014   void addss(XMMRegister dst, Address src)        { Assembler::addss(dst, src); }
1015   void addss(XMMRegister dst, AddressLiteral src);




 430 
 431   // Floating-point comparison for Java
 432   // Compares the top-most stack entries on the FPU stack and stores the result in dst.
 433   // The arguments are in reversed order on the stack (i.e., top of stack is first argument).
 434   // (semantics as described in JVM spec.)
 435   void fcmp2int(Register dst, bool unordered_is_less);
 436   // Variant of the above which allows y to be further down the stack
 437   // and which only pops x and y if specified. If pop_right is
 438   // specified then pop_left must also be specified.
 439   void fcmp2int(Register dst, bool unordered_is_less, int index, bool pop_left, bool pop_right);
 440 
 441   // Floating-point remainder for Java (ST0 = ST0 fremr ST1, ST1 is empty afterwards)
 442   // tmp is a temporary register, if none is available use noreg
 443   void fremr(Register tmp);
 444 
 445 
 446   // same as fcmp2int, but using SSE2
 447   void cmpss2int(XMMRegister opr1, XMMRegister opr2, Register dst, bool unordered_is_less);
 448   void cmpsd2int(XMMRegister opr1, XMMRegister opr2, Register dst, bool unordered_is_less);
 449 
 450   void mathfunc(address runtime_entry);







 451 
 452   // branch to L if FPU flag C2 is set/not set
 453   // tmp is a temporary register, if none is available use noreg
 454   void jC2 (Register tmp, Label& L);
 455   void jnC2(Register tmp, Label& L);
 456 
 457   // Pop ST (ffree & fincstp combined)
 458   void fpop();
 459 
 460   // Load float value from 'address'. If UseSSE >= 1, the value is loaded into
 461   // register xmm0. Otherwise, the value is loaded onto the FPU stack.
 462   void load_float(Address src);
 463 
 464   // Store float value to 'address'. If UseSSE >= 1, the value is stored
 465   // from register xmm0. Otherwise, the value is stored from the FPU stack.
 466   void store_float(Address dst);
 467 
 468   // Load double value from 'address'. If UseSSE >= 2, the value is loaded into
 469   // register xmm0. Otherwise, the value is loaded onto the FPU stack.
 470   void load_double(Address src);


 966   void libm_sincos_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx,
 967                         Register edx, Register ebx, Register esi, Register edi,
 968                         Register ebp, Register esp);
 969 
 970   void libm_reduce_pi04l(Register eax, Register ecx, Register edx, Register ebx,
 971                          Register esi, Register edi, Register ebp, Register esp);
 972 
 973   void libm_tancot_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx,
 974                         Register edx, Register ebx, Register esi, Register edi,
 975                         Register ebp, Register esp);
 976 
 977   void fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3,
 978                 XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
 979                 Register rax, Register rcx, Register rdx, Register tmp);
 980 #endif
 981 
 982   void increase_precision();
 983   void restore_precision();
 984 
 985 private:



 986 
 987   // these are private because users should be doing movflt/movdbl
 988 
 989   void movss(Address dst, XMMRegister src)     { Assembler::movss(dst, src); }
 990   void movss(XMMRegister dst, XMMRegister src) { Assembler::movss(dst, src); }
 991   void movss(XMMRegister dst, Address src)     { Assembler::movss(dst, src); }
 992   void movss(XMMRegister dst, AddressLiteral src);
 993 
 994   void movlpd(XMMRegister dst, Address src)    {Assembler::movlpd(dst, src); }
 995   void movlpd(XMMRegister dst, AddressLiteral src);
 996 
 997 public:
 998 
 999   void addsd(XMMRegister dst, XMMRegister src)    { Assembler::addsd(dst, src); }
1000   void addsd(XMMRegister dst, Address src)        { Assembler::addsd(dst, src); }
1001   void addsd(XMMRegister dst, AddressLiteral src);
1002 
1003   void addss(XMMRegister dst, XMMRegister src)    { Assembler::addss(dst, src); }
1004   void addss(XMMRegister dst, Address src)        { Assembler::addss(dst, src); }
1005   void addss(XMMRegister dst, AddressLiteral src);


< prev index next >