use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testMakeAddressAddBaseNoOverwrite.
@Test
public void testMakeAddressAddBaseNoOverwrite() {
AArch64Address address = masm.makeAddress(base, NumUtil.getNbitNumberInt(12), index, false, 8, scratch, false);
Assert.assertTrue(address.isScaled() && address.getAddressingMode() == AArch64Address.AddressingMode.REGISTER_OFFSET && address.getBase().equals(scratch) && address.getOffset().equals(index));
asm.add(64, scratch, base, NumUtil.getNbitNumberInt(12));
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testLoadAddressExtendedRegisterOffsetScaled.
@Test
public void testLoadAddressExtendedRegisterOffsetScaled() {
Register dst = AArch64.r26;
AArch64Address address = AArch64Address.createExtendedRegisterOffsetAddress(base, index, true, AArch64Assembler.ExtendType.SXTW);
masm.loadAddress(dst, address, 4);
asm.add(64, dst, base, index, AArch64Assembler.ExtendType.SXTW, 2);
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testLoadAddressRegisterOffsetUnscaled.
@Test
public void testLoadAddressRegisterOffsetUnscaled() {
Register dst = AArch64.r26;
AArch64Address address = AArch64Address.createRegisterOffsetAddress(base, index, false);
masm.loadAddress(dst, address, 4);
asm.add(64, dst, base, index, AArch64Assembler.ShiftType.LSL, 0);
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testLoadAddressScaled.
@Test
public void testLoadAddressScaled() {
Register dst = AArch64.r26;
AArch64Address address = AArch64Address.createScaledImmediateAddress(base, NumUtil.getNbitNumberInt(12));
masm.loadAddress(dst, address, 8);
asm.add(64, dst, base, NumUtil.getNbitNumberInt(9) << 3);
asm.add(64, dst, dst, NumUtil.getNbitNumberInt(3) << 12);
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testLoadAddressScaledHigherOnly.
@Test
public void testLoadAddressScaledHigherOnly() {
Register dst = AArch64.r26;
AArch64Address address = AArch64Address.createScaledImmediateAddress(base, 1 << 11);
masm.loadAddress(dst, address, 8);
asm.add(64, dst, base, 1 << 11 << 3);
compareAssembly();
}
Aggregations