use of org.graalvm.compiler.lir.aarch64.AArch64AddressValue in project graal by oracle.
the class AArch64ArithmeticLIRGenerator method emitExtendMemory.
public Value emitExtendMemory(boolean isSigned, AArch64Kind memoryKind, int resultBits, AArch64AddressValue address, LIRFrameState state) {
// Issue a zero extending load of the proper bit size and set the result to
// the proper kind.
Variable result = getLIRGen().newVariable(LIRKind.value(resultBits == 32 ? AArch64Kind.DWORD : AArch64Kind.QWORD));
int targetSize = resultBits <= 32 ? 32 : 64;
switch(memoryKind) {
case BYTE:
case WORD:
case DWORD:
case QWORD:
getLIRGen().append(new AArch64Unary.MemoryOp(isSigned, targetSize, memoryKind.getSizeInBytes() * 8, result, address, state));
break;
default:
throw GraalError.shouldNotReachHere();
}
return result;
}
use of org.graalvm.compiler.lir.aarch64.AArch64AddressValue in project graal by oracle.
the class AArch64ReadNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
AArch64LIRGenerator lirgen = (AArch64LIRGenerator) gen.getLIRGeneratorTool();
AArch64ArithmeticLIRGenerator arithgen = (AArch64ArithmeticLIRGenerator) lirgen.getArithmetic();
AArch64Kind readKind = (AArch64Kind) lirgen.getLIRKind(accessStamp).getPlatformKind();
int resultBits = ((IntegerStamp) stamp(NodeView.DEFAULT)).getBits();
gen.setResult(this, arithgen.emitExtendMemory(isSigned, readKind, resultBits, (AArch64AddressValue) gen.operand(getAddress()), gen.state(this)));
}
Aggregations