Search in sources :

Example 1 with AMD64AddressNode

use of org.graalvm.compiler.core.amd64.AMD64AddressNode in project graal by oracle.

the class AMD64HotSpotAddressLowering method postProcess.

@Override
public void postProcess(AddressNode lowered) {
    // Allow implicit zero extend for always positive input. This
    // assumes that the upper bits of the operand is zero out by
    // the backend.
    AMD64AddressNode address = (AMD64AddressNode) lowered;
    address.setBase(tryImplicitZeroExtend(address.getBase()));
    address.setIndex(tryImplicitZeroExtend(address.getIndex()));
}
Also used : AMD64AddressNode(org.graalvm.compiler.core.amd64.AMD64AddressNode)

Example 2 with AMD64AddressNode

use of org.graalvm.compiler.core.amd64.AMD64AddressNode in project graal by oracle.

the class AMD64AddressLoweringTest method assertAddress.

private static void assertAddress(AddressNode actual, ValueNode expectedBase, ValueNode expectedIndex, Scale expectedScale, int expectedDisplacement) {
    AMD64AddressNode address = (AMD64AddressNode) actual;
    Assert.assertEquals(expectedBase, address.getBase());
    Assert.assertEquals(expectedIndex, address.getIndex());
    Assert.assertEquals(expectedScale, address.getScale());
    Assert.assertEquals(expectedDisplacement, address.getDisplacement());
}
Also used : AMD64AddressNode(org.graalvm.compiler.core.amd64.AMD64AddressNode)

Aggregations

AMD64AddressNode (org.graalvm.compiler.core.amd64.AMD64AddressNode)2