From: dave.martin@linaro•org (Dave Martin)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/3] ARM: entry: Remove unnecessary masking when decoding Thumb-2 instructions
Date: Tue, 16 Aug 2011 17:21:41 +0100 [thread overview]
Message-ID: <20110816162141.GE1993@arm.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1108161217140.20358@xanadu.home>
On Tue, Aug 16, 2011 at 12:17:35PM -0400, Nicolas Pitre wrote:
> On Tue, 16 Aug 2011, Dave Martin wrote:
>
> > When testing whether a Thumb-2 instruction is 32 bits long or not,
> > the masking done in order to test bits 11-15 of the first
> > instruction halfword won't affect the result of the comparison, so
> > remove it.
> >
> > Signed-off-by: Dave Martin <dave.martin@linaro•org>
>
> Acked-by: Nicolas Pitre <nicolas.pitre@linaro•org>
>
Thanks
---Dave
>
> > ---
> > arch/arm/kernel/entry-armv.S | 6 ++----
> > 1 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
> > index a87cbf8..b7236d4 100644
> > --- a/arch/arm/kernel/entry-armv.S
> > +++ b/arch/arm/kernel/entry-armv.S
> > @@ -262,8 +262,7 @@ __und_svc:
> > ldr r0, [r4, #-4]
> > #else
> > ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2
> > - and r9, r0, #0xf800
> > - cmp r9, #0xe800 @ 32-bit instruction if xx >= 0
> > + cmp r0, #0xe800 @ 32-bit instruction if xx >= 0
> > ldrhhs r9, [r4] @ bottom 16 bits
> > orrhs r0, r9, r0, lsl #16
> > #endif
> > @@ -445,8 +444,7 @@ __und_usr:
> > ARM( ldrht r5, [r4], #2 )
> > THUMB( ldrht r5, [r4] )
> > THUMB( add r4, r4, #2 )
> > - and r0, r5, #0xf800 @ mask bits 111x x... .... ....
> > - cmp r0, #0xe800 @ 32bit instruction if xx != 0
> > + cmp r5, #0xe800 @ 32bit instruction if xx != 0
> > blo __und_usr_unknown
> > 3: ldrht r0, [r4]
> > add r2, r2, #2 @ r2 is PC + 2, make it PC + 4
> > --
> > 1.7.4.1
> >
next prev parent reply other threads:[~2011-08-16 16:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 14:14 [PATCH 0/3] Fix Thumb-2 undef handling for mixed-arch kernels Dave Martin
2011-08-16 14:14 ` [PATCH 1/3] ARM: Make cpu_alignment into a global variable Dave Martin
2011-08-16 16:15 ` Nicolas Pitre
2011-08-16 16:21 ` Dave Martin
2011-08-17 11:31 ` Sergei Shtylyov
2011-08-17 13:37 ` Dave Martin
2011-08-16 14:14 ` [PATCH 2/3] ARM: entry: Remove unnecessary masking when decoding Thumb-2 instructions Dave Martin
2011-08-16 16:17 ` Nicolas Pitre
2011-08-16 16:21 ` Dave Martin [this message]
2011-08-16 14:14 ` [PATCH 3/3] ARM: entry: Fix Thumb-2 undef handling for multi-CPU kernels Dave Martin
2011-08-16 14:51 ` Tixy
2011-08-16 15:47 ` Nicolas Pitre
2011-08-16 16:05 ` Dave Martin
2011-08-16 16:14 ` Nicolas Pitre
2011-08-16 16:20 ` Dave Martin
2011-08-16 14:58 ` [PATCH 0/3] Fix Thumb-2 undef handling for mixed-arch kernels Tixy
2011-08-16 16:06 ` Dave Martin
2011-08-16 16:43 ` Tixy
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=20110816162141.GE1993@arm.com \
--to=dave.martin@linaro$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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