Mercurial > hg > aarch64-jdk8u51-b16-hotspot
changeset 8070:13af349259e6
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 | 44142a22d60f |
children | 7164279a42b0 |
files | src/cpu/aarch64/vm/aarch64.ad src/cpu/aarch64/vm/aarch64_ad.m4 |
diffstat | 2 files changed, 26 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/aarch64/vm/aarch64.ad Wed Feb 04 12:13:46 2015 +0000 +++ b/src/cpu/aarch64/vm/aarch64.ad Thu Feb 05 11:47:33 2015 -0800 @@ -6389,7 +6389,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); @@ -6401,7 +6401,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); @@ -6413,7 +6413,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); @@ -6427,7 +6427,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); @@ -9526,7 +9526,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); @@ -9542,7 +9542,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); @@ -9556,7 +9556,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)))); @@ -9565,7 +9565,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)))); @@ -9574,7 +9574,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)))); @@ -9583,7 +9583,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)))); @@ -9594,7 +9594,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); @@ -9609,7 +9609,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); @@ -9622,7 +9622,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)))); @@ -9631,7 +9631,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)))); @@ -9640,7 +9640,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)))); @@ -9649,7 +9649,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/src/cpu/aarch64/vm/aarch64_ad.m4 Wed Feb 04 12:13:46 2015 +0000 +++ b/src/cpu/aarch64/vm/aarch64_ad.m4 Thu Feb 05 11:47:33 2015 -0800 @@ -138,8 +138,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); @@ -162,7 +162,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); %}') @@ -182,7 +182,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); %} @@ -212,7 +212,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); @@ -221,14 +221,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); @@ -236,12 +236,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)))); @@ -250,7 +250,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))));