changeset 4209:41b9ca06bcc8

Remove stack-to-stack moves because 32-bit memory push and pop instructions are not available on Intel 64 bit.
author Christian Wimmer <Christian.Wimmer@Oracle.com>
date Tue, 03 Jan 2012 18:35:37 -0800
parents a051fafaa4a9
children 4e86f3befd65
files graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64MoveOpcode.java
diffstat 2 files changed, 0 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Tue Jan 03 18:33:54 2012 -0800
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Tue Jan 03 18:35:37 2012 -0800
@@ -1516,13 +1516,6 @@
         emitByte(0x58 | encode);
     }
 
-    public final void popl(CiAddress dst) {
-        // NOTE: this will adjust stack by 8byte on 64bits
-        prefix(dst);
-        emitByte(0x8F);
-        emitOperandHelper(rax, dst);
-    }
-
     public final void prefetchPrefix(CiAddress src) {
         prefix(src);
         emitByte(0x0F);
@@ -1654,13 +1647,6 @@
         emitByte(0x9C);
     }
 
-    public final void pushl(CiAddress src) {
-        // Note this will push 64bit on 64bit
-        prefix(src);
-        emitByte(0xFF);
-        emitOperandHelper(rsi, src);
-    }
-
     public final void pxor(CiRegister dst, CiAddress src) {
         assert dst.isFpu();
 
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64MoveOpcode.java	Tue Jan 03 18:33:54 2012 -0800
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64MoveOpcode.java	Tue Jan 03 18:35:37 2012 -0800
@@ -189,8 +189,6 @@
         } else if (isStackSlot(input)) {
             if (isRegister(result)) {
                 stack2reg(tasm, masm, result, input);
-            } else if (isStackSlot(result)) {
-                stack2stack(tasm, masm, result, input);
             } else {
                 throw Util.shouldNotReachHere();
             }
@@ -246,25 +244,6 @@
         }
     }
 
-    private static void stack2stack(TargetMethodAssembler tasm, AMD64MacroAssembler masm, CiValue result, CiValue input) {
-        switch (result.kind) {
-            case Jsr:
-            case Int:
-            case Float:
-                masm.pushl(tasm.asAddress(input));
-                masm.popl(tasm.asAddress(result));
-                break;
-            case Long:
-            case Double:
-            case Object:
-                masm.pushq(tasm.asAddress(input));
-                masm.popq(tasm.asAddress(result));
-                break;
-            default:
-                throw Util.shouldNotReachHere();
-        }
-    }
-
     private static void const2reg(TargetMethodAssembler tasm, AMD64MacroAssembler masm, CiValue result, CiConstant c) {
         switch (result.kind) {
             case Jsr: