Skip to content

Commit

Permalink
64bit opt Intel fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Rogers committed Sep 15, 2009
1 parent 4015a0a commit 73bc517
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
30 changes: 30 additions & 0 deletions rvm/src-generated/opt-burs/ia32/IA32-Int2Long-64.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#####
# INT_2LONG
#####
r: INT_2LONG(r)
15
EMIT_INSTRUCTION
INT_2LONG(P(p), Unary.getResult(P(p)), Unary.getVal(P(p)), true);

r: INT_2LONG(load32)
13
EMIT_INSTRUCTION
INT_2LONG(P(p), Unary.getResult(P(p)), consumeMO(), true);

r: LONG_AND(INT_2LONG(r), LONG_CONSTANT)
(Binary.getVal2(P(p)).asLongConstant().upper32() == 0) && \
(Binary.getVal2(P(p)).asLongConstant().lower32() == -1)? 11 : INFINITE
EMIT_INSTRUCTION
INT_2LONG(P(p), Binary.getResult(P(p)), Unary.getVal(PL(p)), false);

r: LONG_AND(INT_2LONG(load32), LONG_CONSTANT)
(Binary.getVal2(P(p)).asLongConstant().upper32() == 0) && \
(Binary.getVal2(P(p)).asLongConstant().lower32() == -1)? 13 : INFINITE
EMIT_INSTRUCTION
INT_2LONG(P(p), Binary.getResult(P(p)), consumeMO(), false);

r: INT_2ADDRZerExt(r)
15
EMIT_INSTRUCTION
INT_2LONG(P(p), Unary.getResult(P(p)), Unary.getVal(P(p)), false);

Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ protected final MemoryOperand MO(Operand base, Operand offset, byte size, Offset
} else {
return MO_BD(offset, Offset.fromLong(disp.toLong()+LV(base)), size, loc, guard);
}
} else if (base instanceof IntConstantOperand) {
if (offset instanceof IntConstantOperand) {
return MO_D(Offset.fromLong(disp.toLong()+IV(base)+IV(offset)), size, loc, guard);
} else {
return MO_BD(offset, Offset.fromLong(disp.toLong()+IV(base)), size, loc, guard);
}
} else {
if (offset instanceof IntConstantOperand) {
return MO_BD(base, disp.plus(IV(offset)), size, loc, guard);
Expand Down

0 comments on commit 73bc517

Please sign in to comment.