Skip to content
Snippets Groups Projects

arm64: msac: Explicitly use the ldur instruction

Merged Martin Storsjö requested to merge mstorsjo/dav1d:explicit-ldur into master
1 unresolved thread

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.

CC @KyleSiefring

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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 Siefring
  • That'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 a ldurh. (And if you change both into ldrh and disassemble the output object file, you'll find this exact form anyway.)

  • Please register or sign in to reply
  • Henrik Gramner approved this merge request

    approved this merge request

  • changed milestone to %1.4.2

  • added ARM label

  • Please register or sign in to reply
    Loading