From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v1 3/8] xen/arm: Support sign-extension for every read access Date: Tue, 29 Sep 2015 14:13:41 +0100 Message-ID: <1443532421.16718.65.camel@citrix.com> References: <1443192698-16163-1-git-send-email-julien.grall@citrix.com> <1443192698-16163-4-git-send-email-julien.grall@citrix.com> <1443199485.25250.212.camel@citrix.com> <56098549.2080503@citrix.com> <1443524629.16718.49.camel@citrix.com> <560A7265.3040307@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZgujE-0007Ng-3o for xen-devel@lists.xenproject.org; Tue, 29 Sep 2015 13:13:56 +0000 In-Reply-To: <560A7265.3040307@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall , xen-devel@lists.xenproject.org Cc: Vijaya.Kumar@caviumnetworks.com, stefano.stabellini@citrix.com, manish.jaggi@caviumnetworks.com, vijay.kilari@gmail.com List-Id: xen-devel@lists.xenproject.org On Tue, 2015-09-29 at 12:13 +0100, Julien Grall wrote: > > Or is it, couldn't we be updating a byte in the middle of the word? > > *r is a register, the byte/half-word/word... are always living in the > lowest bit of the register. So just to check: ldrs* do support e.g odd offsets, but given a 32 bit MMIO region which reads 0xAABBCCDD then when reading from offset 1 at this point *r contains 0x000000CC already (and not 0x0000C00) and sign extending the lowest byte is therefore correct. Right? > > > Probably figuring out the correct assertion is more hassle than it is > > worth.. > > I would rather skip it. > > [1] http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf >