This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM64: LDR (register) SXTX extend

Hi,

What's the purpose of the SXTX extend? I understand the concept of sign extension when, say, the source register is 32-bit and the target is 64-bit.

In this case, however, both registers are 64-bit. So what's the point? What can you do with SXTX that you cannot do using other LDR (register) variants?

Thanks,

Nikita

Parents
  • Right, sxtx is not allowed, but sxtw:

    <Wm>  When option<0> is set to 0, is the 32-bit name of the general-purpose index register, encoded in the
    "Rm" field.

    and

    UXTW when option = 010
    LSL when option = 011
    SXTW when option = 110
    SXTX when option = 111

    But the sense behind: ldr x0,[x1,x2,sxtx] is not clear to me I have to admit.
    I need to test this on real hardware.

Reply
  • Right, sxtx is not allowed, but sxtw:

    <Wm>  When option<0> is set to 0, is the 32-bit name of the general-purpose index register, encoded in the
    "Rm" field.

    and

    UXTW when option = 010
    LSL when option = 011
    SXTW when option = 110
    SXTX when option = 111

    But the sense behind: ldr x0,[x1,x2,sxtx] is not clear to me I have to admit.
    I need to test this on real hardware.

Children