Skip to content

aarch64: Explicitly use the ldur instruction where relevant in mc_dotprod.S

Martin Storsjö requested to merge mstorsjo/dav1d:arm-dotprod-ldur into master

The ldr instruction only can handle offsets that are a multiple of the element size; most assemblers implicitly produce the ldur instruction when a non-aligned offset is provided.

Older versions of MS armasm64, however, error out on this. Since MSVC 2022 17.8, armasm64 implicitly can produce ldur, but 2022 17.7 and earlier require explicitly writing the instruction as ldur.

Despite this, even older versions still fail to build the mc_dotprod.S sources, with errors like this:

src\libdav1d.a.p\mc_dotprod.obj.asm(556) : error A2513: operand 2: Constant value out of range
    mov             x10, (((0*15-1)<<7)|(3*15-1))

This happens on MSVC 2022 17.1 and older, while 17.2 and newer accept the negative value expression here.

In practice, HAVE_DOTPROD doesn't get enabled by the Meson configure script at the moment, as it uses inline assembly to test for external assembler features.

Merge request reports

Loading