Mercurial > hg > truffle
comparison graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java @ 21080:3253fe1bed41
Remove CompressedNullCheckOp, merge functionality into regular NullCheckOp.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Wed, 22 Apr 2015 16:46:57 +0200 |
parents | f259c81821ef |
children | 9965d71c8971 |
comparison
equal
deleted
inserted
replaced
21079:5454085a08a7 | 21080:3253fe1bed41 |
---|---|
180 } | 180 } |
181 | 181 |
182 public static final class NullCheckOp extends AMD64LIRInstruction implements NullCheck { | 182 public static final class NullCheckOp extends AMD64LIRInstruction implements NullCheck { |
183 public static final LIRInstructionClass<NullCheckOp> TYPE = LIRInstructionClass.create(NullCheckOp.class); | 183 public static final LIRInstructionClass<NullCheckOp> TYPE = LIRInstructionClass.create(NullCheckOp.class); |
184 | 184 |
185 @Use({REG}) protected AllocatableValue input; | 185 @Use({COMPOSITE}) protected AMD64AddressValue address; |
186 @State protected LIRFrameState state; | 186 @State protected LIRFrameState state; |
187 | 187 |
188 public NullCheckOp(Variable input, LIRFrameState state) { | 188 public NullCheckOp(AMD64AddressValue address, LIRFrameState state) { |
189 super(TYPE); | 189 super(TYPE); |
190 this.input = input; | 190 this.address = address; |
191 this.state = state; | 191 this.state = state; |
192 } | 192 } |
193 | 193 |
194 @Override | 194 @Override |
195 public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler masm) { | 195 public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler masm) { |
196 crb.recordImplicitException(masm.position(), state); | 196 crb.recordImplicitException(masm.position(), state); |
197 masm.nullCheck(asRegister(input)); | 197 masm.nullCheck(address.toAddress()); |
198 } | 198 } |
199 | 199 |
200 public Value getCheckedValue() { | 200 public Value getCheckedValue() { |
201 return input; | 201 return address.base; |
202 } | 202 } |
203 | 203 |
204 public LIRFrameState getState() { | 204 public LIRFrameState getState() { |
205 return state; | 205 return state; |
206 } | 206 } |