OpenJDK / portola / portola
changeset 29190:9917b8aed927
8072483: AARCH64: aarch64.ad uses the wrong operand class for some operations
Summary: Use iReg<X>NoSp registers operands where required.
Reviewed-by: kvn, adinn, enevill
author | aph |
---|---|
date | Thu, 05 Feb 2015 11:47:33 -0800 |
parents | 9252ebf92115 |
children | 07d26bb7e4bc |
files | hotspot/src/cpu/aarch64/vm/aarch64.ad hotspot/src/cpu/aarch64/vm/aarch64_ad.m4 |
diffstat | 2 files changed, 26 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad Mon Feb 02 11:29:37 2015 -0800 +++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad Thu Feb 05 11:47:33 2015 -0800 @@ -6286,7 +6286,7 @@ // ============================================================================ // Zero Count Instructions -instruct countLeadingZerosI(iRegI dst, iRegI src) %{ +instruct countLeadingZerosI(iRegINoSp dst, iRegI src) %{ match(Set dst (CountLeadingZerosI src)); ins_cost(INSN_COST); @@ -6298,7 +6298,7 @@ ins_pipe(ialu_reg); %} -instruct countLeadingZerosL(iRegI dst, iRegL src) %{ +instruct countLeadingZerosL(iRegINoSp dst, iRegL src) %{ match(Set dst (CountLeadingZerosL src)); ins_cost(INSN_COST); @@ -6310,7 +6310,7 @@ ins_pipe(ialu_reg); %} -instruct countTrailingZerosI(iRegI dst, iRegI src) %{ +instruct countTrailingZerosI(iRegINoSp dst, iRegI src) %{ match(Set dst (CountTrailingZerosI src)); ins_cost(INSN_COST * 2); @@ -6324,7 +6324,7 @@ ins_pipe(ialu_reg); %} -instruct countTrailingZerosL(iRegI dst, iRegL src) %{ +instruct countTrailingZerosL(iRegINoSp dst, iRegL src) %{ match(Set dst (CountTrailingZerosL src)); ins_cost(INSN_COST * 2); @@ -9471,7 +9471,7 @@ // rol expander -instruct rolL_rReg(iRegL dst, iRegL src, iRegI shift, rFlagsReg cr) +instruct rolL_rReg(iRegLNoSp dst, iRegL src, iRegI shift, rFlagsReg cr) %{ effect(DEF dst, USE src, USE shift); @@ -9487,7 +9487,7 @@ // rol expander -instruct rolI_rReg(iRegI dst, iRegI src, iRegI shift, rFlagsReg cr) +instruct rolI_rReg(iRegINoSp dst, iRegI src, iRegI shift, rFlagsReg cr) %{ effect(DEF dst, USE src, USE shift); @@ -9501,7 +9501,7 @@ ins_pipe(ialu_reg_reg_vshift); %} -instruct rolL_rReg_Var_C_64(iRegL dst, iRegL src, iRegI shift, immI_64 c_64, rFlagsReg cr) +instruct rolL_rReg_Var_C_64(iRegLNoSp dst, iRegL src, iRegI shift, immI_64 c_64, rFlagsReg cr) %{ match(Set dst (OrL (LShiftL src shift) (URShiftL src (SubI c_64 shift)))); @@ -9510,7 +9510,7 @@ %} %} -instruct rolL_rReg_Var_C0(iRegL dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) +instruct rolL_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) %{ match(Set dst (OrL (LShiftL src shift) (URShiftL src (SubI c0 shift)))); @@ -9519,7 +9519,7 @@ %} %} -instruct rolI_rReg_Var_C_32(iRegL dst, iRegL src, iRegI shift, immI_32 c_32, rFlagsReg cr) +instruct rolI_rReg_Var_C_32(iRegLNoSp dst, iRegL src, iRegI shift, immI_32 c_32, rFlagsReg cr) %{ match(Set dst (OrI (LShiftI src shift) (URShiftI src (SubI c_32 shift)))); @@ -9528,7 +9528,7 @@ %} %} -instruct rolI_rReg_Var_C0(iRegL dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) +instruct rolI_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) %{ match(Set dst (OrI (LShiftI src shift) (URShiftI src (SubI c0 shift)))); @@ -9539,7 +9539,7 @@ // ror expander -instruct rorL_rReg(iRegL dst, iRegL src, iRegI shift, rFlagsReg cr) +instruct rorL_rReg(iRegLNoSp dst, iRegL src, iRegI shift, rFlagsReg cr) %{ effect(DEF dst, USE src, USE shift); @@ -9554,7 +9554,7 @@ // ror expander -instruct rorI_rReg(iRegI dst, iRegI src, iRegI shift, rFlagsReg cr) +instruct rorI_rReg(iRegINoSp dst, iRegI src, iRegI shift, rFlagsReg cr) %{ effect(DEF dst, USE src, USE shift); @@ -9567,7 +9567,7 @@ ins_pipe(ialu_reg_reg_vshift); %} -instruct rorL_rReg_Var_C_64(iRegL dst, iRegL src, iRegI shift, immI_64 c_64, rFlagsReg cr) +instruct rorL_rReg_Var_C_64(iRegLNoSp dst, iRegL src, iRegI shift, immI_64 c_64, rFlagsReg cr) %{ match(Set dst (OrL (URShiftL src shift) (LShiftL src (SubI c_64 shift)))); @@ -9576,7 +9576,7 @@ %} %} -instruct rorL_rReg_Var_C0(iRegL dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) +instruct rorL_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) %{ match(Set dst (OrL (URShiftL src shift) (LShiftL src (SubI c0 shift)))); @@ -9585,7 +9585,7 @@ %} %} -instruct rorI_rReg_Var_C_32(iRegL dst, iRegL src, iRegI shift, immI_32 c_32, rFlagsReg cr) +instruct rorI_rReg_Var_C_32(iRegLNoSp dst, iRegL src, iRegI shift, immI_32 c_32, rFlagsReg cr) %{ match(Set dst (OrI (URShiftI src shift) (LShiftI src (SubI c_32 shift)))); @@ -9594,7 +9594,7 @@ %} %} -instruct rorI_rReg_Var_C0(iRegL dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) +instruct rorI_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr) %{ match(Set dst (OrI (URShiftI src shift) (LShiftI src (SubI c0 shift))));
--- a/hotspot/src/cpu/aarch64/vm/aarch64_ad.m4 Mon Feb 02 11:29:37 2015 -0800 +++ b/hotspot/src/cpu/aarch64/vm/aarch64_ad.m4 Thu Feb 05 11:47:33 2015 -0800 @@ -163,8 +163,8 @@ int s = $2 - lshift; int r = (rshift - lshift) & $2; __ $4(as_Register($dst$$reg), - as_Register($src$$reg), - r, s); + as_Register($src$$reg), + r, s); %} ins_pipe(ialu_reg_shift); @@ -187,7 +187,7 @@ long mask = $mask$$constant; int width = exact_log2(mask+1); __ $3(as_Register($dst$$reg), - as_Register($src$$reg), rshift, width); + as_Register($src$$reg), rshift, width); %} ins_pipe(ialu_reg_shift); %}') @@ -207,7 +207,7 @@ long mask = $mask$$constant; int width = exact_log2(mask+1); __ ubfx(as_Register($dst$$reg), - as_Register($src$$reg), rshift, width); + as_Register($src$$reg), rshift, width); %} ins_pipe(ialu_reg_shift); %} @@ -237,7 +237,7 @@ define(`ROL_EXPAND', ` // $2 expander -instruct $2$1_rReg(iReg$1 dst, iReg$1 src, iRegI shift, rFlagsReg cr) +instruct $2$1_rReg(iReg$1NoSp dst, iReg$1 src, iRegI shift, rFlagsReg cr) %{ effect(DEF dst, USE src, USE shift); @@ -246,14 +246,14 @@ ins_encode %{ __ subw(rscratch1, zr, as_Register($shift$$reg)); __ $3(as_Register($dst$$reg), as_Register($src$$reg), - rscratch1); + rscratch1); %} ins_pipe(ialu_reg_reg_vshift); %}')dnl define(`ROR_EXPAND', ` // $2 expander -instruct $2$1_rReg(iReg$1 dst, iReg$1 src, iRegI shift, rFlagsReg cr) +instruct $2$1_rReg(iReg$1NoSp dst, iReg$1 src, iRegI shift, rFlagsReg cr) %{ effect(DEF dst, USE src, USE shift); @@ -261,12 +261,12 @@ ins_cost(INSN_COST); ins_encode %{ __ $3(as_Register($dst$$reg), as_Register($src$$reg), - as_Register($shift$$reg)); + as_Register($shift$$reg)); %} ins_pipe(ialu_reg_reg_vshift); %}')dnl define(ROL_INSN, ` -instruct $3$1_rReg_Var_C$2(iRegL dst, iRegL src, iRegI shift, immI$2 c$2, rFlagsReg cr) +instruct $3$1_rReg_Var_C$2(iRegLNoSp dst, iRegL src, iRegI shift, immI$2 c$2, rFlagsReg cr) %{ match(Set dst (Or$1 (LShift$1 src shift) (URShift$1 src (SubI c$2 shift)))); @@ -275,7 +275,7 @@ %} %}')dnl define(ROR_INSN, ` -instruct $3$1_rReg_Var_C$2(iRegL dst, iRegL src, iRegI shift, immI$2 c$2, rFlagsReg cr) +instruct $3$1_rReg_Var_C$2(iRegLNoSp dst, iRegL src, iRegI shift, immI$2 c$2, rFlagsReg cr) %{ match(Set dst (Or$1 (URShift$1 src shift) (LShift$1 src (SubI c$2 shift))));