This is the mail archive of the
mailing list for the binutils project.
RE: [Patch ARM Gas] - strexh/strexb warn for bad addressing modes.
- From: "James Greenhalgh" <james dot greenhalgh at arm dot com>
- To: <binutils at sourceware dot org>
- Cc: "'hazelnusse'" <hazelnusse at gmail dot com>
- Date: Thu, 22 Sep 2011 13:59:08 +0100
- Subject: RE: [Patch ARM Gas] - strexh/strexb warn for bad addressing modes.
- References: <000601cc4861$5df11510$19d33f30$@firstname.lastname@example.org> <4E32CCDE.email@example.com> <000c01cc4e04$e44ae110$ace0a330$@firstname.lastname@example.org> <email@example.com>
> If you read this literally, it only says STREX has the restriction that
> you've added to gas, and that it doesn't apply to any of the other ones
> particular STREXH and STREXB). I'm not sure if this is the same across
> the ARM7/9/11 processors, but it certainly seems that this should be an
> allowed instruction for Cortex M3, given that they are shipping this
> instruction with their CMSIS stuff.
In my copy of the ARMARMv7M  strexb, strexh and strex are all listed
as UNPREDICTABLE when rd == rt || rd == rn.
I would read the quoted passage of the User Guide Reference Material
as saying "for Store-Exclusive Instructions, Rd must be different
from both Rt and Rn". Which better fits with the description in the
There is potentially an argument for making these UNPREDICTABLE behaviours
warnings, but this would just mask the real issue, which, IMHO is
that the library is not sufficiently cautious with the registers it uses
for these instructions.
If you want further advice on the CMSIS libraries I would suggest going
through your normal CMSIS support channels.