arm64: msac: Explicitly use the ldur instruction
The ldr instruction can take an immediate offset which is a multiple of the loaded element size. If the ldr instruction is given an immediate offset which isn't a multiple of the element size, most assemblers implicitly generate a "ldur" instruction instead.
Older versions of MS armasm64.exe don't do this, but instead error out with "error A2518: operand 2: Memory offset must be aligned". (Current versions don't do this but correctly generate "ldur" implicitly.)
Switch this instruction to an explicit "ldur", like we do elsewhere, to fix building with these older tools.
Merge request reports
Activity
requested review from @gramner
271 271 .elseif \n == 16 272 272 add x8, sp, w15, sxtw #1 273 273 ldrh w3, [x8, #48] // v 274 274 ldurh w4, [x8, #46] // u I could never figure out why these were different instructions before I started mucking about in this code. Is this possibly related and require a similar change?
Edited by Kyle SiefringThat's indeed related, but doesn't require a similar change - it's already done. (With this MR in place, it builds fine with the older, picky versions of MS armasm64.) 48 is a multiple of 4, so the first load is a plain
ldrh
while 46 isn't, so it's aldurh
. (And if you change both intoldrh
and disassemble the output object file, you'll find this exact form anyway.)
changed milestone to %1.4.2
added ARM label