Skip to content

Integrated assembler rejects ldrexd/strexd in thumb mode #30406

Closed
@sbc100

Description

@sbc100
Bugzilla Link 31058
Resolution WORKSFORME
Resolved on Jan 24, 2017 09:32
Version trunk
OS Linux
Blocks #20796
CC @kbeyls,@nico,@rengolin,@frobtech

Extended Description

These instructions are apparently valid in thumb2 mode but clang's integrated asm rejects them:

void func() {
int volatile *ptr;
int ret;
asm volatile("ldrexd %0,[%1]\n"
: "=&r" (ret)
: "r" (ptr)
: "cc", "memory"
);
}

$ clang --target=arm-linux-gnueabihf -march=armv7-a -o test.o -c test.c -mthumb
test.c:4:24: error: instruction requires: arm-mode
asm volatile("ldrexd %0,[%1]\n"
^
:1:2: note: instantiated into assembly here
ldrexd r1,[r0]
^
1 error generated.

With -no-integrated-as the same code compiles fine:

See https://bugs.chromium.org/p/chromium/issues/detail?id=564059

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"worksformeResolved as "works for me"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions