use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testLoadAddressUnscaled2.
@Test
public void testLoadAddressUnscaled2() {
Register dst = AArch64.r26;
AArch64Address address = AArch64Address.createUnscaledImmediateAddress(base, -NumUtil.getNbitNumberInt(8));
masm.loadAddress(dst, address, 8);
asm.sub(64, dst, base, NumUtil.getNbitNumberInt(8));
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testMakeAddressAddIndex.
@Test
public void testMakeAddressAddIndex() {
AArch64Address address = masm.makeAddress(base, NumUtil.getNbitNumberInt(8) << 5, index, false, 8, null, true);
Assert.assertTrue(address.isScaled() && address.getAddressingMode() == AArch64Address.AddressingMode.REGISTER_OFFSET && address.getBase().equals(base) && address.getOffset().equals(index));
asm.add(64, index, index, NumUtil.getNbitNumberInt(8) << 2);
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testMakeAddressAddBase.
@Test
public void testMakeAddressAddBase() {
AArch64Address address = masm.makeAddress(base, NumUtil.getNbitNumberInt(12), index, false, 8, null, true);
Assert.assertTrue(address.isScaled() && address.getAddressingMode() == AArch64Address.AddressingMode.REGISTER_OFFSET && address.getBase().equals(base) && address.getOffset().equals(index));
asm.add(64, base, base, NumUtil.getNbitNumberInt(12));
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testMakeAddressNoAction.
@Test
public void testMakeAddressNoAction() {
AArch64Address address = masm.makeAddress(base, NumUtil.getNbitNumberInt(12) << 3, AArch64.zr, false, 8, null, false);
Assert.assertTrue(address.isScaled() && address.getAddressingMode() == AArch64Address.AddressingMode.IMMEDIATE_SCALED && address.getBase().equals(base) && address.getOffset().equals(AArch64.zr) && address.getImmediateRaw() == NumUtil.getNbitNumberInt(12));
// No code generated.
compareAssembly();
}
use of org.graalvm.compiler.asm.aarch64.AArch64Address in project graal by oracle.
the class AArch64MacroAssemblerTest method testMakeAddressAddIndexExtend.
@Test
public void testMakeAddressAddIndexExtend() {
AArch64Address address = masm.makeAddress(base, NumUtil.getNbitNumberInt(8) << 5, index, true, 8, scratch, true);
Assert.assertTrue(address.isScaled() && address.getAddressingMode() == AArch64Address.AddressingMode.EXTENDED_REGISTER_OFFSET && address.getBase().equals(base) && address.getOffset().equals(index) && address.getExtendType() == AArch64Assembler.ExtendType.SXTW);
asm.add(32, index, index, NumUtil.getNbitNumberInt(8) << 2);
compareAssembly();
}
Aggregations