public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Luke <hazelnusse@gmail.com>
To: James Greenhalgh <james.greenhalgh@arm.com>
Cc: binutils@sourceware.org
Subject: Re: [Patch ARM Gas] - strexh/strexb warn for bad addressing modes.
Date: Thu, 22 Sep 2011 16:07:00 -0000	[thread overview]
Message-ID: <CAEQ-UNfeZUPpbA0Y4hsJzpf3mCmcaVpGpYdcALG++Z1dg86aag@mail.gmail.com> (raw)
In-Reply-To: <4e7b3128.41c8e30a.6565.ffff9e55SMTPIN_ADDED@mx.google.com>

You are correct, the behavior is undefined and your patch does the
right thing.  I'll pass this along to the CMSIS folks and give them a
heads up.

~Luke

On Thu, Sep 22, 2011 at 5:59 AM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
> Hi,
>
>> 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
>> (in
>> particular STREXH and STREXB).  I'm not sure if this is the same across
>> all
>> 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 [0] 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
> ARMARM.
>
> 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.
>
> Regards
> James Greenhalgh
>
> [0] -
> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0403c/index.h
> tml
>
>
>
>



-- 
"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

-- Benjamin Franklin, Historical Review of Pennsylvania, 1759

      parent reply	other threads:[~2011-09-22 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 20:16 James Greenhalgh
2011-07-29 15:58 ` Nick Clifton
2011-07-29 16:16   ` James Greenhalgh
2011-08-03 11:37     ` Nick Clifton
2011-09-20 23:14     ` hazelnusse
2011-09-22 12:59       ` James Greenhalgh
2011-10-13  8:18         ` Nick Clifton
     [not found]       ` <4e7b3128.41c8e30a.6565.ffff9e55SMTPIN_ADDED@mx.google.com>
2011-09-22 16:07         ` Luke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEQ-UNfeZUPpbA0Y4hsJzpf3mCmcaVpGpYdcALG++Z1dg86aag@mail.gmail.com \
    --to=hazelnusse@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=james.greenhalgh@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).