Search in sources :

Example 1 with AMD64PushPopStackMove

use of org.graalvm.compiler.lir.amd64.AMD64Move.AMD64PushPopStackMove in project graal by oracle.

the class AMD64MoveFactoryBase method createStackMove.

@Override
public final AMD64LIRInstruction createStackMove(AllocatableValue result, AllocatableValue input) {
    AMD64Kind kind = (AMD64Kind) result.getPlatformKind();
    switch(kind.getSizeInBytes()) {
        case 2:
            return new AMD64PushPopStackMove(WORD, result, input);
        case 8:
            return new AMD64PushPopStackMove(QWORD, result, input);
        default:
            RegisterBackupPair backup = backupSlotProvider.getScratchRegister(input.getPlatformKind());
            Register scratchRegister = backup.register;
            VirtualStackSlot backupSlot = backup.backupSlot;
            return createStackMove(result, input, scratchRegister, backupSlot);
    }
}
Also used : AMD64Kind(jdk.vm.ci.amd64.AMD64Kind) Register(jdk.vm.ci.code.Register) AMD64PushPopStackMove(org.graalvm.compiler.lir.amd64.AMD64Move.AMD64PushPopStackMove) VirtualStackSlot(org.graalvm.compiler.lir.VirtualStackSlot)

Aggregations

AMD64Kind (jdk.vm.ci.amd64.AMD64Kind)1 Register (jdk.vm.ci.code.Register)1 VirtualStackSlot (org.graalvm.compiler.lir.VirtualStackSlot)1 AMD64PushPopStackMove (org.graalvm.compiler.lir.amd64.AMD64Move.AMD64PushPopStackMove)1