9804 instruct cmpD_imm(rRegI dst, regD src, immD con, rFlagsReg cr) %{ 9805 match(Set dst (CmpD3 src con)); 9806 effect(KILL cr); 9807 9808 ins_cost(275); 9809 format %{ "ucomisd $src, [$constantaddress]\t# load from constant table: double=$con\n\t" 9810 "movl $dst, #-1\n\t" 9811 "jp,s done\n\t" 9812 "jb,s done\n\t" 9813 "setne $dst\n\t" 9814 "movzbl $dst, $dst\n" 9815 "done:" %} 9816 ins_encode %{ 9817 __ ucomisd($src$$XMMRegister, $constantaddress($con)); 9818 emit_cmpfp3(_masm, $dst$$Register); 9819 %} 9820 ins_pipe(pipe_slow); 9821 %} 9822 9823 // -----------Trig and Trancendental Instructions------------------------------ 9824 instruct cosD_reg(regD dst) %{ 9825 match(Set dst (CosD dst)); 9826 9827 format %{ "dcos $dst\n\t" %} 9828 opcode(0xD9, 0xFF); 9829 ins_encode( Push_SrcXD(dst), OpcP, OpcS, Push_ResultXD(dst) ); 9830 ins_pipe( pipe_slow ); 9831 %} 9832 9833 instruct sinD_reg(regD dst) %{ 9834 match(Set dst (SinD dst)); 9835 9836 format %{ "dsin $dst\n\t" %} 9837 opcode(0xD9, 0xFE); 9838 ins_encode( Push_SrcXD(dst), OpcP, OpcS, Push_ResultXD(dst) ); 9839 ins_pipe( pipe_slow ); 9840 %} 9841 9842 instruct tanD_reg(regD dst) %{ 9843 match(Set dst (TanD dst)); 9844 9845 format %{ "dtan $dst\n\t" %} 9846 ins_encode( Push_SrcXD(dst), 9847 Opcode(0xD9), Opcode(0xF2), //fptan 9848 Opcode(0xDD), Opcode(0xD8), //fstp st 9849 Push_ResultXD(dst) ); 9850 ins_pipe( pipe_slow ); 9851 %} 9852 9853 instruct log10D_reg(regD dst) %{ 9854 // The source and result Double operands in XMM registers 9855 match(Set dst (Log10D dst)); 9856 // fldlg2 ; push log_10(2) on the FPU stack; full 80-bit number 9857 // fyl2x ; compute log_10(2) * log_2(x) 9858 format %{ "fldlg2\t\t\t#Log10\n\t" 9859 "fyl2x\t\t\t# Q=Log10*Log_2(x)\n\t" 9860 %} | 9804 instruct cmpD_imm(rRegI dst, regD src, immD con, rFlagsReg cr) %{ 9805 match(Set dst (CmpD3 src con)); 9806 effect(KILL cr); 9807 9808 ins_cost(275); 9809 format %{ "ucomisd $src, [$constantaddress]\t# load from constant table: double=$con\n\t" 9810 "movl $dst, #-1\n\t" 9811 "jp,s done\n\t" 9812 "jb,s done\n\t" 9813 "setne $dst\n\t" 9814 "movzbl $dst, $dst\n" 9815 "done:" %} 9816 ins_encode %{ 9817 __ ucomisd($src$$XMMRegister, $constantaddress($con)); 9818 emit_cmpfp3(_masm, $dst$$Register); 9819 %} 9820 ins_pipe(pipe_slow); 9821 %} 9822 9823 // -----------Trig and Trancendental Instructions------------------------------ 9824 9825 instruct tanD_reg(regD dst) %{ 9826 match(Set dst (TanD dst)); 9827 9828 format %{ "dtan $dst\n\t" %} 9829 ins_encode( Push_SrcXD(dst), 9830 Opcode(0xD9), Opcode(0xF2), //fptan 9831 Opcode(0xDD), Opcode(0xD8), //fstp st 9832 Push_ResultXD(dst) ); 9833 ins_pipe( pipe_slow ); 9834 %} 9835 9836 instruct log10D_reg(regD dst) %{ 9837 // The source and result Double operands in XMM registers 9838 match(Set dst (Log10D dst)); 9839 // fldlg2 ; push log_10(2) on the FPU stack; full 80-bit number 9840 // fyl2x ; compute log_10(2) * log_2(x) 9841 format %{ "fldlg2\t\t\t#Log10\n\t" 9842 "fyl2x\t\t\t# Q=Log10*Log_2(x)\n\t" 9843 %} |