[llvm-bugs] [Bug 39532] New: Assembly parsing error (too many operands for instruction) for ARM Cortex-M
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Nov 2 00:39:16 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39532
Bug ID: 39532
Summary: Assembly parsing error (too many operands for
instruction) for ARM Cortex-M
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: jsshin at sor.snu.ac.kr
CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
error encountered when compiling newlib for Cortex-M3 with -Os.
====== ldrb.S ===================
.text
.global test
.type test, %function
ldrb.w r2, [r3], #1
.size test, . - strlen
==================================
Compiling above code with gives error.
$ clang -target arm-none-eabi -mcpu=cortex-m3 -c ldrb.S
ldrb.S:5:19: error: too many operands for instruction
ldrb.w r2, [r3], #1
^
GCC compiles it without complaining.
Whether or not this behavior is correct is a bit confusing because "A7.7.45
LDRB(immediate)" section of the ARM7-m architecture manual shows that .W
suffix is applied to T2 encoding but not to T3 encoding (above).
However "A7.2 Standard assembler syntax fields" suggests that .W suffix is used
to force the assembler to select 32-bit encoding. So I think Clang shouldn't
really regard it as an error.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181102/05995c0e/attachment.html>
More information about the llvm-bugs
mailing list