From: Peng Fan <b51431@freescale.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: Julien Grall <julien.grall@citrix.com>,
Peng Fan <Peng.Fan@freescale.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 2/2] xen: arm: traps: correct cond
Date: Tue, 22 Sep 2015 08:46:09 +0800 [thread overview]
Message-ID: <20150922004608.GB18030@shlinux2> (raw)
In-Reply-To: <1442831590.10338.45.camel@citrix.com>
On Mon, Sep 21, 2015 at 11:33:10AM +0100, Ian Campbell wrote:
>On Mon, 2015-09-21 at 17:08 +0800, Peng Fan wrote:
>> On Mon, Sep 21, 2015 at 11:10:11AM +0100, Julien Grall wrote:
>> > Hi Peng,
>> >
>> > On 21/09/15 08:07, Peng Fan wrote:
>> > > From "G6.2.29 CPSR, Current Program Status Register" of Aarch64 ARM
>> > > and "B1.3.3 Program Status Registers (PSRs)" of ARMv7-A ARM:
>> > > "
>> >
>> > The section number may change between the different version of the
>> > spec.
>> > Can you also precise the spec version?
>> >
>> > For instance on my ARM64 spec (ARM DDI 0497A.d) the section G6.2.29
>> > points to "CSSELR" and not "CPSR".
>> >
>> > > IT[7:5] holds the base condition for the IT block. The base condition
>> > > is
>> > > the top 3 bits of the condition code specified by the first
>> > > condition field of the IT instruction.
>> > > IT[4:0] encodes the size of the IT block, which is the number of
>> > > instructions that are to be conditionally executed, by the
>> > > position of the least significant 1 in this field. It also
>> > > encodes the value of the least significant bit of the condition
>> > > code for each instruction in the block.
>> > > "
>> > > So should be "cond = ( it >> 5 );" but not "cond = ( it >> 4 );"
>> >
>> > IT[7:5] encodes the top 3 bits of the condition code and one bit of
>> > IT[4:0] will contain the least significant bit of the condition code.
>> >
>> > In order to get the full condition code you have to use IT[7:4] which
>> > the current code does (see A2.5.2 ARM DDI 0406C.b).
>> >
>> > So the current code looks valid to me. Did I miss something?
>>
>> No, you are correct.
>
>Were these two patches motivated by an actual issue you were seeing? Or
>just from code inspection?
Just code inspection, not an actual issue.
Regards,
Peng.
>
--
prev parent reply other threads:[~2015-09-22 0:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 7:07 [PATCH 2/2] xen: arm: traps: correct cond Peng Fan
2015-09-21 10:10 ` Julien Grall
2015-09-21 9:08 ` Peng Fan
2015-09-21 10:33 ` Ian Campbell
2015-09-22 0:46 ` Peng Fan [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=20150922004608.GB18030@shlinux2 \
--to=b51431@freescale.com \
--cc=Peng.Fan@freescale.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.