< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java
Print this page
@@ -60,15 +60,30 @@
import jdk.vm.ci.meta.Value;
import jdk.vm.ci.meta.ValueKind;
public class AArch64ArithmeticLIRGenerator extends ArithmeticLIRGenerator implements AArch64ArithmeticLIRGeneratorTool {
+ public AArch64ArithmeticLIRGenerator(AllocatableValue nullRegisterValue) {
+ this.nullRegisterValue = nullRegisterValue;
+ }
+
+ private final AllocatableValue nullRegisterValue;
+
@Override
public AArch64LIRGenerator getLIRGen() {
return (AArch64LIRGenerator) super.getLIRGen();
}
+ public boolean mustReplaceNullWithNullRegister(JavaConstant nullConstant) {
+ /* Uncompressed null pointers only */
+ return nullRegisterValue != null && JavaConstant.NULL_POINTER.equals(nullConstant);
+ }
+
+ public AllocatableValue getNullRegisterValue() {
+ return nullRegisterValue;
+ }
+
@Override
protected boolean isNumericInteger(PlatformKind kind) {
return ((AArch64Kind) kind).isInteger();
}
@@ -483,15 +498,10 @@
AllocatableValue input = asAllocatable(inputVal);
getLIRGen().append(new StoreOp(kind, storeAddress, input, state));
}
@Override
- public void emitCompareOp(AArch64Kind cmpKind, Variable left, Value right) {
- throw GraalError.unimplemented();
- }
-
- @Override
public Value emitRound(Value value, RoundingMode mode) {
AArch64ArithmeticOp op;
switch (mode) {
case NEAREST:
op = AArch64ArithmeticOp.FRINTN;
< prev index next >