Skip to content

thumb2, aclass, rclass, etc. ARM features not supported in clang -mcpu #52878

Closed as not planned
@silversquirl

Description

@silversquirl

Several ARM architecture features (and possibly for other archs too, but I only checked ARM) are not included in the table used to validate clang's -mcpu option. This makes it impossible to specify that, for example, thumb2 instructures are available on a CPU model that doesn't normally support them.

This is particularly annoying when using clang to compile assembly, as it will emit errors like this, while providing no way to enable thumb2 other than by running cc1as directly:

test.s:1:2: error: invalid instruction, any one of the following would fix this:
        mov r1, #0
        ^
test.s:1:10: note: operand must be a register in range [r0, r15]
        mov r1, #0
                ^
test.s:1:2: note: instruction requires: thumb2
        mov r1, #0
        ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:ARMquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions