Mercurial > hg > truffle
comparison graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotMove.java @ 21779:20ace3139510
AMD64HotSpotMove: make HotSpotLoadObjectConstantOp and HotSpotLoadMetaspaceConstantOp a MoveOp.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Mon, 08 Jun 2015 13:20:02 +0200 |
parents | 0df7d7d6c25b |
children |
comparison
equal
deleted
inserted
replaced
21778:037d14459ef9 | 21779:20ace3139510 |
---|---|
29 import com.oracle.graal.asm.amd64.*; | 29 import com.oracle.graal.asm.amd64.*; |
30 import com.oracle.graal.asm.amd64.AMD64Assembler.*; | 30 import com.oracle.graal.asm.amd64.AMD64Assembler.*; |
31 import com.oracle.graal.compiler.common.*; | 31 import com.oracle.graal.compiler.common.*; |
32 import com.oracle.graal.hotspot.*; | 32 import com.oracle.graal.hotspot.*; |
33 import com.oracle.graal.lir.*; | 33 import com.oracle.graal.lir.*; |
34 import com.oracle.graal.lir.StandardOp.MoveOp; | |
34 import com.oracle.graal.lir.StandardOp.StackStoreOp; | 35 import com.oracle.graal.lir.StandardOp.StackStoreOp; |
35 import com.oracle.graal.lir.amd64.*; | 36 import com.oracle.graal.lir.amd64.*; |
36 import com.oracle.graal.lir.asm.*; | 37 import com.oracle.graal.lir.asm.*; |
37 import com.oracle.jvmci.code.*; | 38 import com.oracle.jvmci.code.*; |
38 import com.oracle.jvmci.common.*; | 39 import com.oracle.jvmci.common.*; |
40 import com.oracle.jvmci.hotspot.HotSpotVMConfig.CompressEncoding; | 41 import com.oracle.jvmci.hotspot.HotSpotVMConfig.CompressEncoding; |
41 import com.oracle.jvmci.meta.*; | 42 import com.oracle.jvmci.meta.*; |
42 | 43 |
43 public class AMD64HotSpotMove { | 44 public class AMD64HotSpotMove { |
44 | 45 |
45 public static final class HotSpotLoadObjectConstantOp extends AMD64LIRInstruction { | 46 public static final class HotSpotLoadObjectConstantOp extends AMD64LIRInstruction implements MoveOp { |
46 public static final LIRInstructionClass<HotSpotLoadObjectConstantOp> TYPE = LIRInstructionClass.create(HotSpotLoadObjectConstantOp.class); | 47 public static final LIRInstructionClass<HotSpotLoadObjectConstantOp> TYPE = LIRInstructionClass.create(HotSpotLoadObjectConstantOp.class); |
47 | 48 |
48 @Def({REG, STACK}) private AllocatableValue result; | 49 @Def({REG, STACK}) private AllocatableValue result; |
49 private final HotSpotObjectConstant input; | 50 private final HotSpotObjectConstant input; |
50 | 51 |
84 } else { | 85 } else { |
85 throw JVMCIError.shouldNotReachHere("Cannot directly store data patch to memory"); | 86 throw JVMCIError.shouldNotReachHere("Cannot directly store data patch to memory"); |
86 } | 87 } |
87 } | 88 } |
88 } | 89 } |
89 } | 90 |
90 | 91 public Value getInput() { |
91 public static final class HotSpotLoadMetaspaceConstantOp extends AMD64LIRInstruction { | 92 return input; |
93 } | |
94 | |
95 public AllocatableValue getResult() { | |
96 return result; | |
97 } | |
98 } | |
99 | |
100 public static final class HotSpotLoadMetaspaceConstantOp extends AMD64LIRInstruction implements MoveOp { | |
92 public static final LIRInstructionClass<HotSpotLoadMetaspaceConstantOp> TYPE = LIRInstructionClass.create(HotSpotLoadMetaspaceConstantOp.class); | 101 public static final LIRInstructionClass<HotSpotLoadMetaspaceConstantOp> TYPE = LIRInstructionClass.create(HotSpotLoadMetaspaceConstantOp.class); |
93 | 102 |
94 @Def({REG, STACK}) private AllocatableValue result; | 103 @Def({REG, STACK}) private AllocatableValue result; |
95 private final HotSpotMetaspaceConstant input; | 104 private final HotSpotMetaspaceConstant input; |
96 | 105 |
139 } else { | 148 } else { |
140 throw JVMCIError.shouldNotReachHere("Cannot store 64-bit constants to memory"); | 149 throw JVMCIError.shouldNotReachHere("Cannot store 64-bit constants to memory"); |
141 } | 150 } |
142 } | 151 } |
143 } | 152 } |
153 | |
154 public Value getInput() { | |
155 return (Value) input; | |
156 } | |
157 | |
158 public AllocatableValue getResult() { | |
159 return result; | |
160 } | |
144 } | 161 } |
145 | 162 |
146 public static final class CompressPointer extends AMD64LIRInstruction { | 163 public static final class CompressPointer extends AMD64LIRInstruction { |
147 public static final LIRInstructionClass<CompressPointer> TYPE = LIRInstructionClass.create(CompressPointer.class); | 164 public static final LIRInstructionClass<CompressPointer> TYPE = LIRInstructionClass.create(CompressPointer.class); |
148 | 165 |