AArch64Address.lea missed BASE_REGISTER_ONLY case

Dmitry Samersoff dms at samersoff.net
Tue Feb 27 18:45:11 UTC 2018


Hi Everybody,

AArch64Address.lea missed BASE_REGISTER_ONLY case. Is it a bug?

Bellow is a fragment of AArch64Address.lea:

 public void lea(AArch64MacroAssembler masm, Register r) {
        switch (addressingMode) {
            case IMMEDIATE_UNSCALED:
                if (immediate == 0 && base.equals(r)) { // it's a nop
                    break;
                }
                masm.add(64, r, base, immediate);
                break;
            case REGISTER_OFFSET:
                masm.add(64, r, base, offset);
                break;
           ...

BASE_REGISTER_ONLY case is missing and

masm.lea(array1, AArch64Address.createBaseRegisterOnlyAddress(array1));

cause an assert.

Is it a bug? If yes, I'll create a pull requires with the fix.

-Dmitry

-- 
Dmitry Samersoff
http://devnull.samersoff.net
* There will come soft rains ...



More information about the graal-dev mailing list