1 /* |
1 /* |
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
22 */ |
22 */ |
23 |
23 |
24 |
24 |
25 package org.graalvm.compiler.hotspot.amd64; |
25 package org.graalvm.compiler.hotspot.amd64; |
26 |
26 |
|
27 import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.ILLEGAL; |
27 import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG; |
28 import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG; |
28 import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.STACK; |
29 import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.STACK; |
29 |
30 |
30 import org.graalvm.compiler.asm.amd64.AMD64MacroAssembler; |
31 import org.graalvm.compiler.asm.amd64.AMD64MacroAssembler; |
31 import org.graalvm.compiler.lir.LIRInstructionClass; |
32 import org.graalvm.compiler.lir.LIRInstructionClass; |
32 import org.graalvm.compiler.lir.amd64.AMD64BlockEndOp; |
33 import org.graalvm.compiler.lir.amd64.AMD64BlockEndOp; |
33 import org.graalvm.compiler.lir.asm.CompilationResultBuilder; |
34 import org.graalvm.compiler.lir.asm.CompilationResultBuilder; |
34 |
35 |
35 import jdk.vm.ci.meta.AllocatableValue; |
36 import jdk.vm.ci.meta.AllocatableValue; |
|
37 import jdk.vm.ci.meta.Value; |
36 |
38 |
37 /** |
39 /** |
38 * @see AMD64HotSpotEpilogueOp |
40 * @see AMD64HotSpotEpilogueOp |
39 */ |
41 */ |
40 abstract class AMD64HotSpotEpilogueBlockEndOp extends AMD64BlockEndOp implements AMD64HotSpotRestoreRbpOp { |
42 abstract class AMD64HotSpotEpilogueBlockEndOp extends AMD64BlockEndOp implements AMD64HotSpotRestoreRbpOp { |
41 |
43 |
42 protected AMD64HotSpotEpilogueBlockEndOp(LIRInstructionClass<? extends AMD64HotSpotEpilogueBlockEndOp> c) { |
44 protected AMD64HotSpotEpilogueBlockEndOp(LIRInstructionClass<? extends AMD64HotSpotEpilogueBlockEndOp> c) { |
43 super(c); |
45 super(c); |
44 } |
46 } |
45 |
47 |
46 @Use({REG, STACK}) protected AllocatableValue savedRbp = PLACEHOLDER; |
48 @Use({REG, STACK, ILLEGAL}) protected AllocatableValue savedRbp = Value.ILLEGAL; |
47 |
49 |
48 protected void leaveFrameAndRestoreRbp(CompilationResultBuilder crb, AMD64MacroAssembler masm) { |
50 protected void leaveFrameAndRestoreRbp(CompilationResultBuilder crb, AMD64MacroAssembler masm) { |
49 AMD64HotSpotEpilogueOp.leaveFrameAndRestoreRbp(savedRbp, crb, masm); |
51 AMD64HotSpotEpilogueOp.leaveFrameAndRestoreRbp(savedRbp, crb, masm); |
50 } |
52 } |
51 |
53 |