# HG changeset patch # User enevill # Date 1440063608 0 # Node ID c0fd47b40d85b4a4251d721c08ce96c4c080d444 # Parent 4b0d672fa09cbc07c118d6d158bfd1284fc10df4 8133842: aarch64: C2 generates illegal instructions with int shifts >=32 Summary: Fix logical operatations combined with shifts >= 32 Reviewed-by: duke diff -r 4b0d672fa09c -r c0fd47b40d85 src/cpu/aarch64/vm/aarch64.ad --- a/src/cpu/aarch64/vm/aarch64.ad Tue Aug 18 12:40:22 2015 +0000 +++ b/src/cpu/aarch64/vm/aarch64.ad Thu Aug 20 09:40:08 2015 +0000 @@ -9011,7 +9011,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9049,7 +9049,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::ASR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9087,7 +9087,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSL, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9125,7 +9125,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9163,7 +9163,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::ASR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9201,7 +9201,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSL, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9239,7 +9239,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9277,7 +9277,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::ASR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9315,7 +9315,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSL, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9353,7 +9353,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9391,7 +9391,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::ASR, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); @@ -9429,7 +9429,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::LSL, - $src3$$constant & 0x3f); + $src3$$constant & 0x1f); %} ins_pipe(ialu_reg_reg_shift); diff -r 4b0d672fa09c -r c0fd47b40d85 src/cpu/aarch64/vm/aarch64_ad.m4 --- a/src/cpu/aarch64/vm/aarch64_ad.m4 Tue Aug 18 12:40:22 2015 +0000 +++ b/src/cpu/aarch64/vm/aarch64_ad.m4 Thu Aug 20 09:40:08 2015 +0000 @@ -42,7 +42,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::$5, - $src3$$constant & 0x3f); + $src3$$constant & ifelse($1,I,0x1f,0x3f)); %} ins_pipe(ialu_reg_reg_shift); @@ -87,7 +87,7 @@ as_Register($src1$$reg), as_Register($src2$$reg), Assembler::$5, - $src3$$constant & 0x3f); + $src3$$constant & ifelse($1,I,0x1f,0x3f)); %} ins_pipe(ialu_reg_reg_shift);