src/cpu/x86/vm/x86_64.ad
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/x86/vm/x86_64.ad Mon Sep 21 11:51:33 2015
--- new/src/cpu/x86/vm/x86_64.ad Mon Sep 21 11:51:32 2015
*** 3765,3774 ****
--- 3765,3790 ----
scale($scale);
disp(0x0);
%}
%}
+ operand indPosIndexScale(any_RegP reg, rRegI idx, immI2 scale)
+ %{
+ constraint(ALLOC_IN_RC(ptr_reg));
+ predicate(n->in(3)->in(1)->as_Type()->type()->is_long()->_lo >= 0);
+ match(AddP reg (LShiftL (ConvI2L idx) scale));
+
+ op_cost(10);
+ format %{"[$reg + pos $idx << $scale]" %}
+ interface(MEMORY_INTER) %{
+ base($reg);
+ index($idx);
+ scale($scale);
+ disp(0x0);
+ %}
+ %}
+
// Indirect Memory Times Scale Plus Index Register Plus Offset Operand
operand indIndexScaleOffset(any_RegP reg, immL32 off, rRegL lreg, immI2 scale)
%{
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (AddP reg (LShiftL lreg scale)) off);
*** 4157,4167 ****
--- 4173,4183 ----
// instructions for every form of operand when the instruction accepts
// multiple operand types with the same basic encoding and format. The classic
// case of this is memory operands.
opclass memory(indirect, indOffset8, indOffset32, indIndexOffset, indIndex,
! indIndexScale, indPosIndexScale, indIndexScaleOffset, indPosIndexOffset, indPosIndexScaleOffset,
indCompressedOopOffset,
indirectNarrow, indOffset8Narrow, indOffset32Narrow,
indIndexOffsetNarrow, indIndexNarrow, indIndexScaleNarrow,
indIndexScaleOffsetNarrow, indPosIndexOffsetNarrow, indPosIndexScaleOffsetNarrow);
*** 5179,5188 ****
--- 5195,5215 ----
%{
match(Set dst mem);
ins_cost(110);
format %{ "leaq $dst, $mem\t# ptr idxscale" %}
+ opcode(0x8D);
+ ins_encode(REX_reg_mem_wide(dst, mem), OpcP, reg_mem(dst, mem));
+ ins_pipe(ialu_reg_reg_fat);
+ %}
+
+ instruct leaPPosIdxScale(rRegP dst, indPosIndexScale mem)
+ %{
+ match(Set dst mem);
+
+ ins_cost(110);
+ format %{ "leaq $dst, $mem\t# ptr idxscale" %}
opcode(0x8D);
ins_encode(REX_reg_mem_wide(dst, mem), OpcP, reg_mem(dst, mem));
ins_pipe(ialu_reg_reg_fat);
%}
src/cpu/x86/vm/x86_64.ad
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File