use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AArch64ArithmeticLIRGenerator method emitCountLeadingZeros.
@Override
public Value emitCountLeadingZeros(Value value) {
Variable result = getLIRGen().newVariable(LIRKind.combine(value).changeType(AArch64Kind.DWORD));
getLIRGen().append(new AArch64BitManipulationOp(CLZ, result, getLIRGen().asAllocatable(value)));
return result;
}
use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AArch64LIRGenerator method emitByteSwap.
@Override
public Variable emitByteSwap(Value input) {
Variable result = newVariable(LIRKind.combine(input));
append(new AArch64ByteSwapOp(result, input));
return result;
}
use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AArch64LIRGenerator method emitIntegerTestMove.
/**
* Moves trueValue into result if (left & right) == 0, else falseValue.
*
* @param left Integer kind. Non null.
* @param right Integer kind. Non null.
* @param trueValue Integer kind. Non null.
* @param falseValue Integer kind. Non null.
* @return virtual register containing trueValue if (left & right) == 0, else falseValue.
*/
@Override
public Variable emitIntegerTestMove(Value left, Value right, Value trueValue, Value falseValue) {
assert ((AArch64Kind) left.getPlatformKind()).isInteger() && ((AArch64Kind) right.getPlatformKind()).isInteger();
assert ((AArch64Kind) trueValue.getPlatformKind()).isInteger() && ((AArch64Kind) falseValue.getPlatformKind()).isInteger();
((AArch64ArithmeticLIRGenerator) getArithmetic()).emitBinary(left.getValueKind(), AArch64ArithmeticOp.ANDS, true, left, right);
Variable result = newVariable(trueValue.getValueKind());
append(new CondMoveOp(result, ConditionFlag.EQ, load(trueValue), load(falseValue)));
return result;
}
use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AArch64LIRGenerator method emitArrayEquals.
@Override
public Variable emitArrayEquals(JavaKind kind, Value array1, Value array2, Value length) {
Variable result = newVariable(LIRKind.value(AArch64Kind.DWORD));
append(new AArch64ArrayEqualsOp(this, kind, result, array1, array2, asAllocatable(length)));
return result;
}
use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AArch64LIRGenerator method emitValueCompareAndSwap.
@Override
public Variable emitValueCompareAndSwap(Value address, Value expectedValue, Value newValue) {
Variable result = newVariable(newValue.getValueKind());
Variable scratch = newVariable(LIRKind.value(AArch64Kind.WORD));
append(new CompareAndSwapOp(result, loadNonCompareConst(expectedValue), loadReg(newValue), asAllocatable(address), scratch));
return result;
}
Aggregations