fix register to memory mov1 implementation

This commit is contained in:
Joel Dice 2008-01-18 15:01:50 -07:00
parent dc6c7e9121
commit 88a8e74a53
2 changed files with 7 additions and 2 deletions

View File

@ -1959,9 +1959,10 @@ MemoryOperand::accept(Context* c, Operation op, RegisterOperand* operand)
case mov1:
if (BytesPerWord == 8) {
if (operand->value(c) > rbx) {
c->code.append(0x40);
encode2(c, 0x4088, operand->value(c), this, false);
} else {
encode(c, 0x88, operand->value(c), this, false);
}
encode(c, 0x88, operand->value(c), this, false);
} else {
if (operand->value(c) > rbx) {
RegisterOperand* ax = temporary(c, rax);

View File

@ -1,6 +1,7 @@
public class Misc {
private static int alpha;
private static int beta;
private static byte byte1, byte2, byte3;
private int gamma;
private String foo(String s) {
@ -51,6 +52,9 @@ public class Misc {
}
public static void main(String[] args) {
byte2 = 0;
expect(byte2 == 0);
Misc m = new Misc();
m.toString();