src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java Sat Dec 08 05:04:19 2018 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java Sat Dec 08 00:56:10 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -159,6 +159,25 @@
}
}
+ public static class CondSetOp extends AArch64LIRInstruction {
+ public static final LIRInstructionClass<CondSetOp> TYPE = LIRInstructionClass.create(CondSetOp.class);
+
+ @Def protected Value result;
+ private final AArch64Assembler.ConditionFlag condition;
+
+ public CondSetOp(Variable result, AArch64Assembler.ConditionFlag condition) {
+ super(TYPE);
+ this.result = result;
+ this.condition = condition;
+ }
+
+ @Override
+ public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {
+ int size = result.getPlatformKind().getSizeInBytes() * Byte.SIZE;
+ masm.cset(size, asRegister(result), condition);
+ }
+ }
+
public static class StrategySwitchOp extends AArch64BlockEndOp implements StandardOp.BlockEndOp {
public static final LIRInstructionClass<StrategySwitchOp> TYPE = LIRInstructionClass.create(StrategySwitchOp.class);