Skip to content

Error assembling movk instruction on aarch64 in clang 19 (breaks compiling isa-l on aarch64) #124427

@DaGenix

Description

@DaGenix

The following assembly:

.equ    p4_low_b0, 0x0000
movk    x1, p4_low_b0, lsl 16

Could be assembled by earlier versions of clang (I tested 16, 17, and 18). However, starting with 5da8013, trying to assemble this code now produces:

> clang -c test.S
test.S:2:25: error: unexpected token in argument list
movk x1, p4_low_b0, lsl 16
                        ^

If we modify the code to not use .equ:

movk    x1, 0x0000, lsl 16

Then it assembles without error.

I found this issue when attempting to compile https://github.com/intel/isa-l on MacOS aarch64 with clang 19.

FYI: @MaskRay

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions