use of jdk.vm.ci.aarch64.AArch64Kind in project graal by oracle.
the class AArch64ArithmeticLIRGenerator method emitStore.
@Override
public void emitStore(ValueKind<?> lirKind, Value address, Value inputVal, LIRFrameState state) {
AArch64AddressValue storeAddress = getLIRGen().asAddressValue(address);
AArch64Kind kind = (AArch64Kind) lirKind.getPlatformKind();
if (isJavaConstant(inputVal) && kind.isInteger()) {
JavaConstant c = asJavaConstant(inputVal);
if (c.isDefaultForKind()) {
// We can load 0 directly into integer registers
getLIRGen().append(new StoreConstantOp(kind, storeAddress, c, state));
return;
}
}
AllocatableValue input = getLIRGen().asAllocatable(inputVal);
getLIRGen().append(new StoreOp(kind, storeAddress, input, state));
}
use of jdk.vm.ci.aarch64.AArch64Kind in project graal by oracle.
the class AArch64Move method reg2reg.
private static void reg2reg(@SuppressWarnings("unused") CompilationResultBuilder crb, AArch64MacroAssembler masm, AllocatableValue result, AllocatableValue input) {
Register dst = asRegister(result);
Register src = asRegister(input);
if (src.equals(dst)) {
return;
}
AArch64Kind kind = (AArch64Kind) input.getPlatformKind();
int size = kind.getSizeInBytes() * Byte.SIZE;
if (kind.isInteger()) {
masm.mov(size, dst, src);
} else {
masm.fmov(size, dst, src);
}
}
use of jdk.vm.ci.aarch64.AArch64Kind in project graal by oracle.
the class AArch64Move method reg2stack.
private static void reg2stack(CompilationResultBuilder crb, AArch64MacroAssembler masm, AllocatableValue result, AllocatableValue input) {
AArch64Address dest = loadStackSlotAddress(crb, masm, asStackSlot(result), Value.ILLEGAL);
Register src = asRegister(input);
// use the slot kind to define the operand size
AArch64Kind kind = (AArch64Kind) result.getPlatformKind();
final int size = kind.getSizeInBytes() * Byte.SIZE;
if (kind.isInteger()) {
masm.str(size, src, dest);
} else {
masm.fstr(size, src, dest);
}
}
use of jdk.vm.ci.aarch64.AArch64Kind in project graal by oracle.
the class AArch64HotSpotLIRGenerator method moveValueToThread.
private void moveValueToThread(Value value, int offset) {
LIRKind wordKind = LIRKind.value(target().arch.getWordKind());
RegisterValue thread = getProviders().getRegisters().getThreadRegister().asValue(wordKind);
final int transferSize = value.getValueKind().getPlatformKind().getSizeInBytes();
AArch64AddressValue address = new AArch64AddressValue(value.getValueKind(), thread, Value.ILLEGAL, offset, transferSize, AddressingMode.IMMEDIATE_SCALED);
append(new StoreOp((AArch64Kind) value.getPlatformKind(), address, loadReg(value), null));
}
use of jdk.vm.ci.aarch64.AArch64Kind in project graal by oracle.
the class AArch64ArithmeticLIRGenerator method emitLoad.
@Override
public Variable emitLoad(LIRKind kind, Value address, LIRFrameState state) {
AArch64AddressValue loadAddress = getLIRGen().asAddressValue(address);
Variable result = getLIRGen().newVariable(getLIRGen().toRegisterKind(kind));
getLIRGen().append(new LoadOp((AArch64Kind) kind.getPlatformKind(), result, loadAddress, state));
return result;
}
Aggregations