src/cpu/x86/vm/x86_32.ad
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6708714 Sdiff src/cpu/x86/vm

src/cpu/x86/vm/x86_32.ad

Print this page




4737 %}
4738 
4739 operand immI_1_31() %{
4740   predicate( n->get_int() >= 1 && n->get_int() <= 31 );
4741   match(ConI);
4742 
4743   op_cost(0);
4744   format %{ %}
4745   interface(CONST_INTER);
4746 %}
4747 
4748 operand immI_32_63() %{
4749   predicate( n->get_int() >= 32 && n->get_int() <= 63 );
4750   match(ConI);
4751   op_cost(0);
4752 
4753   format %{ %}
4754   interface(CONST_INTER);
4755 %}
4756 



























4757 // Pointer Immediate
4758 operand immP() %{
4759   match(ConP);
4760 
4761   op_cost(10);
4762   format %{ %}
4763   interface(CONST_INTER);
4764 %}
4765 
4766 // NULL Pointer Immediate
4767 operand immP0() %{
4768   predicate( n->get_ptr() == 0 );
4769   match(ConP);
4770   op_cost(0);
4771 
4772   format %{ %}
4773   interface(CONST_INTER);
4774 %}
4775 
4776 // Long Immediate


8926   effect(KILL cr);
8927   format %{ "XOR    $dst.lo,$src.lo\n\t"
8928             "XOR    $dst.hi,$src.hi" %}
8929   opcode(0x81,0x06,0x06);  /* Opcode 81 /6, 81 /6 */
8930   ins_encode( Long_OpcSErm_Lo( dst, src ), Long_OpcSErm_Hi( dst, src ) );
8931   ins_pipe( ialu_reg_long );
8932 %}
8933 
8934 // Xor Long Register with Memory
8935 instruct xorl_eReg_mem(eRegL dst, load_long_memory mem, eFlagsReg cr) %{
8936   match(Set dst (XorL dst (LoadL mem)));
8937   effect(KILL cr);
8938   ins_cost(125);
8939   format %{ "XOR    $dst.lo,$mem\n\t"
8940             "XOR    $dst.hi,$mem+4" %}
8941   opcode(0x33,0x33);
8942   ins_encode( OpcP, RegMem( dst, mem), OpcS, RegMem_Hi(dst,mem) );
8943   ins_pipe( ialu_reg_long_mem );
8944 %}
8945 

























































8946 // Shift Left Long by 1-31
8947 instruct shlL_eReg_1_31(eRegL dst, immI_1_31 cnt, eFlagsReg cr) %{
8948   match(Set dst (LShiftL dst cnt));
8949   effect(KILL cr);
8950   ins_cost(200);
8951   format %{ "SHLD   $dst.hi,$dst.lo,$cnt\n\t"
8952             "SHL    $dst.lo,$cnt" %}
8953   opcode(0xC1, 0x4, 0xA4);  /* 0F/A4, then C1 /4 ib */
8954   ins_encode( move_long_small_shift(dst,cnt) );
8955   ins_pipe( ialu_reg_long );
8956 %}
8957 
8958 // Shift Left Long by 32-63
8959 instruct shlL_eReg_32_63(eRegL dst, immI_32_63 cnt, eFlagsReg cr) %{
8960   match(Set dst (LShiftL dst cnt));
8961   effect(KILL cr);
8962   ins_cost(300);
8963   format %{ "MOV    $dst.hi,$dst.lo\n"
8964           "\tSHL    $dst.hi,$cnt-32\n"
8965           "\tXOR    $dst.lo,$dst.lo" %}




4737 %}
4738 
4739 operand immI_1_31() %{
4740   predicate( n->get_int() >= 1 && n->get_int() <= 31 );
4741   match(ConI);
4742 
4743   op_cost(0);
4744   format %{ %}
4745   interface(CONST_INTER);
4746 %}
4747 
4748 operand immI_32_63() %{
4749   predicate( n->get_int() >= 32 && n->get_int() <= 63 );
4750   match(ConI);
4751   op_cost(0);
4752 
4753   format %{ %}
4754   interface(CONST_INTER);
4755 %}
4756 
4757 operand immI_1() %{
4758   predicate( n->get_int() == 1 );
4759   match(ConI);
4760 
4761   op_cost(0);
4762   format %{ %}
4763   interface(CONST_INTER);
4764 %}
4765 
4766 operand immI_2() %{
4767   predicate( n->get_int() == 2 );
4768   match(ConI);
4769 
4770   op_cost(0);
4771   format %{ %}
4772   interface(CONST_INTER);
4773 %}
4774 
4775 operand immI_3() %{
4776   predicate( n->get_int() == 3 );
4777   match(ConI);
4778 
4779   op_cost(0);
4780   format %{ %}
4781   interface(CONST_INTER);
4782 %}
4783 
4784 // Pointer Immediate
4785 operand immP() %{
4786   match(ConP);
4787 
4788   op_cost(10);
4789   format %{ %}
4790   interface(CONST_INTER);
4791 %}
4792 
4793 // NULL Pointer Immediate
4794 operand immP0() %{
4795   predicate( n->get_ptr() == 0 );
4796   match(ConP);
4797   op_cost(0);
4798 
4799   format %{ %}
4800   interface(CONST_INTER);
4801 %}
4802 
4803 // Long Immediate


8953   effect(KILL cr);
8954   format %{ "XOR    $dst.lo,$src.lo\n\t"
8955             "XOR    $dst.hi,$src.hi" %}
8956   opcode(0x81,0x06,0x06);  /* Opcode 81 /6, 81 /6 */
8957   ins_encode( Long_OpcSErm_Lo( dst, src ), Long_OpcSErm_Hi( dst, src ) );
8958   ins_pipe( ialu_reg_long );
8959 %}
8960 
8961 // Xor Long Register with Memory
8962 instruct xorl_eReg_mem(eRegL dst, load_long_memory mem, eFlagsReg cr) %{
8963   match(Set dst (XorL dst (LoadL mem)));
8964   effect(KILL cr);
8965   ins_cost(125);
8966   format %{ "XOR    $dst.lo,$mem\n\t"
8967             "XOR    $dst.hi,$mem+4" %}
8968   opcode(0x33,0x33);
8969   ins_encode( OpcP, RegMem( dst, mem), OpcS, RegMem_Hi(dst,mem) );
8970   ins_pipe( ialu_reg_long_mem );
8971 %}
8972 
8973 // Shift Left Long by 1
8974 instruct shlL_eReg_1(eRegL dst, immI_1 cnt, eFlagsReg cr) %{
8975   predicate(UseNewLongLShift);
8976   match(Set dst (LShiftL dst cnt));
8977   effect(KILL cr);
8978   ins_cost(100);
8979   format %{ "ADD    $dst.lo,$dst.lo\n\t"
8980             "ADC    $dst.hi,$dst.hi" %}
8981   ins_encode %{
8982     __ addl($dst$$Register,$dst$$Register);
8983     __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
8984   %}
8985   ins_pipe( ialu_reg_long );
8986 %}
8987 
8988 // Shift Left Long by 2
8989 instruct shlL_eReg_2(eRegL dst, immI_2 cnt, eFlagsReg cr) %{
8990   predicate(UseNewLongLShift);
8991   match(Set dst (LShiftL dst cnt));
8992   effect(KILL cr);
8993   ins_cost(100);
8994   format %{ "ADD    $dst.lo,$dst.lo\n\t"
8995             "ADC    $dst.hi,$dst.hi\n\t" 
8996             "ADD    $dst.lo,$dst.lo\n\t"
8997             "ADC    $dst.hi,$dst.hi" %}
8998   ins_encode %{
8999     __ addl($dst$$Register,$dst$$Register);
9000     __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
9001     __ addl($dst$$Register,$dst$$Register);
9002     __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
9003   %}
9004   ins_pipe( ialu_reg_long );
9005 %}
9006 
9007 // Shift Left Long by 3
9008 instruct shlL_eReg_3(eRegL dst, immI_3 cnt, eFlagsReg cr) %{
9009   predicate(UseNewLongLShift);
9010   match(Set dst (LShiftL dst cnt));
9011   effect(KILL cr);
9012   ins_cost(100);
9013   format %{ "ADD    $dst.lo,$dst.lo\n\t"
9014             "ADC    $dst.hi,$dst.hi\n\t" 
9015             "ADD    $dst.lo,$dst.lo\n\t"
9016             "ADC    $dst.hi,$dst.hi\n\t" 
9017             "ADD    $dst.lo,$dst.lo\n\t"
9018             "ADC    $dst.hi,$dst.hi" %}
9019   ins_encode %{
9020     __ addl($dst$$Register,$dst$$Register);
9021     __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
9022     __ addl($dst$$Register,$dst$$Register);
9023     __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
9024     __ addl($dst$$Register,$dst$$Register);
9025     __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
9026   %}
9027   ins_pipe( ialu_reg_long );
9028 %}
9029 
9030 // Shift Left Long by 1-31
9031 instruct shlL_eReg_1_31(eRegL dst, immI_1_31 cnt, eFlagsReg cr) %{
9032   match(Set dst (LShiftL dst cnt));
9033   effect(KILL cr);
9034   ins_cost(200);
9035   format %{ "SHLD   $dst.hi,$dst.lo,$cnt\n\t"
9036             "SHL    $dst.lo,$cnt" %}
9037   opcode(0xC1, 0x4, 0xA4);  /* 0F/A4, then C1 /4 ib */
9038   ins_encode( move_long_small_shift(dst,cnt) );
9039   ins_pipe( ialu_reg_long );
9040 %}
9041 
9042 // Shift Left Long by 32-63
9043 instruct shlL_eReg_32_63(eRegL dst, immI_32_63 cnt, eFlagsReg cr) %{
9044   match(Set dst (LShiftL dst cnt));
9045   effect(KILL cr);
9046   ins_cost(300);
9047   format %{ "MOV    $dst.hi,$dst.lo\n"
9048           "\tSHL    $dst.hi,$cnt-32\n"
9049           "\tXOR    $dst.lo,$dst.lo" %}


src/cpu/x86/vm/x86_32.ad
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File