From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] P2V: Thumb2 support
Date: Sun, 13 Feb 2011 11:42:43 +0000 [thread overview]
Message-ID: <20110213114243.GC4799@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.00.1102121331220.14920@xanadu.home>
On Sat, Feb 12, 2011 at 01:33:42PM -0500, Nicolas Pitre wrote:
> __fixup_a_pv_table:
> +#ifdef CONFIG_THUMB2_KERNEL
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
> + lsls r0, r6, #24
> + lsr r6, #8
> + beq 1f
> + clz r7, r0
> + lsrs r0, #24
> + lsls r0, r7
Why do these instructions need to update the PSR?
> + bic r0, 0x0080
> + lsrs r7, #1
> + orrcs r0, #0x0080
> + orr r0, r0, r7, lsl #12
> +#endif
> +1: lsls r6, #24
> + beq 4f
> + clz r7, r6
> + lsrs r6, #24
> + lsls r6, r7
> + bic r6, #0x0080
> + lsrs r7, #1
> + orrcs r6, #0x0080
> + orr r6, r6, r7, lsl #12
> + orr r6, #0x4000
> + b 4f
> +2: add r7, r3
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
> + ldrh ip, [r7]
> + tst ip, 0x0400 @ the i bit tells us LS or MS byte
> + beq 3f
> + cmp r0, #0 @ set C flag, and ...
> + biceq ip, 0x0400 @ immediate zero value has a special encoding
> + streqh ip, [r7] @ that requires the i bit cleared
> +#endif
> +3: ldrh ip, [r7, #2]
> + and ip, 0x8f00
> + orrcc ip, r6 @ mask in offset bits 31-24
> + orrcs ip, r0 @ mask in offset bits 23-16
> + strh ip, [r7, #2]
> +4: cmp r4, r5
> + ldrcc r7, [r4], #4 @ use branch for delay slot
> + bcc 2b
> + bx lr
Something's wrong with the indentation here.
next prev parent reply other threads:[~2011-02-13 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 18:33 [PATCH 2/2] P2V: Thumb2 support Nicolas Pitre
2011-02-13 11:42 ` Russell King - ARM Linux [this message]
2011-02-13 13:56 ` Nicolas Pitre
2011-02-14 12:51 ` Dave Martin
2011-02-14 12:51 ` Dave Martin
2011-02-14 14:48 ` Nicolas Pitre
2011-02-14 14:59 ` Dave Martin
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=20110213114243.GC4799@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox