This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Why does arm-*-as issue a warning for "strb r3, [r3], #1"?
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 23 Jun 2005 22:02:09 -0700
- Subject: Why does arm-*-as issue a warning for "strb r3, [r3], #1"?
Hi,
When I feed "strb r3, [r3], #1" to arm-*-as, the assembler issues a
warning
"source register same as write-back base"
While I like helpful warnings in general, I am wondering if the
assembler should issue a warning for something a little strange but
otherwise correct because a compiler, a major user of the assembler,
tries to get most out of the instruction set (modulo "discouraged"
instructions). Note that gcc's testsuite treats a warning from the
assembler as FAIL. (As far as I can tell from the instruction set
manual, I don't see anything that bans "strb r3, [r3], #1".)
I am tempted to submit a patch to remove this warning from tc-arm.c,
but I am no expert on ARM.
In case you are wondering, this instruction comes from
gcc.c-torture/compile/930210-1.c.
Thoughts?
Kazu Hirata