* [PATCH] arm64: insn: fix compare-and-branch encodings
@ 2015-02-18 15:40 Robin Murphy
2015-02-18 16:08 ` Robin Murphy
0 siblings, 1 reply; 3+ messages in thread
From: Robin Murphy @ 2015-02-18 15:40 UTC (permalink / raw)
To: linux-arm-kernel
Fix cbz/cbnz having the mask offset by a bit, and add encodings for
tbz/tbnz so that all branch forms are represented.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
---
arch/arm64/include/asm/insn.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/insn.h b/arch/arm64/include/asm/insn.h
index e2ff32a..d2f4942 100644
--- a/arch/arm64/include/asm/insn.h
+++ b/arch/arm64/include/asm/insn.h
@@ -264,8 +264,10 @@ __AARCH64_INSN_FUNCS(ands, 0x7F200000, 0x6A000000)
__AARCH64_INSN_FUNCS(bics, 0x7F200000, 0x6A200000)
__AARCH64_INSN_FUNCS(b, 0xFC000000, 0x14000000)
__AARCH64_INSN_FUNCS(bl, 0xFC000000, 0x94000000)
-__AARCH64_INSN_FUNCS(cbz, 0xFE000000, 0x34000000)
-__AARCH64_INSN_FUNCS(cbnz, 0xFE000000, 0x35000000)
+__AARCH64_INSN_FUNCS(cbz, 0x7F000000, 0x34000000)
+__AARCH64_INSN_FUNCS(cbnz, 0x7F000000, 0x35000000)
+__AARCH64_INSN_FUNCS(tbz, 0x7F000000, 0x36000000)
+__AARCH64_INSN_FUNCS(tbnz, 0x7F000000, 0x37000000)
__AARCH64_INSN_FUNCS(bcond, 0xFF000010, 0x54000000)
__AARCH64_INSN_FUNCS(svc, 0xFFE0001F, 0xD4000001)
__AARCH64_INSN_FUNCS(hvc, 0xFFE0001F, 0xD4000002)
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] arm64: insn: fix compare-and-branch encodings
2015-02-18 15:40 [PATCH] arm64: insn: fix compare-and-branch encodings Robin Murphy
@ 2015-02-18 16:08 ` Robin Murphy
2015-02-19 19:33 ` Z Lim
0 siblings, 1 reply; 3+ messages in thread
From: Robin Murphy @ 2015-02-18 16:08 UTC (permalink / raw)
To: linux-arm-kernel
Oops, missed some CCs...
On 18/02/15 15:40, Robin Murphy wrote:
> Fix cbz/cbnz having the mask offset by a bit, and add encodings for
> tbz/tbnz so that all branch forms are represented.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> Acked-by: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/include/asm/insn.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/include/asm/insn.h b/arch/arm64/include/asm/insn.h
> index e2ff32a..d2f4942 100644
> --- a/arch/arm64/include/asm/insn.h
> +++ b/arch/arm64/include/asm/insn.h
> @@ -264,8 +264,10 @@ __AARCH64_INSN_FUNCS(ands, 0x7F200000, 0x6A000000)
> __AARCH64_INSN_FUNCS(bics, 0x7F200000, 0x6A200000)
> __AARCH64_INSN_FUNCS(b, 0xFC000000, 0x14000000)
> __AARCH64_INSN_FUNCS(bl, 0xFC000000, 0x94000000)
> -__AARCH64_INSN_FUNCS(cbz, 0xFE000000, 0x34000000)
> -__AARCH64_INSN_FUNCS(cbnz, 0xFE000000, 0x35000000)
> +__AARCH64_INSN_FUNCS(cbz, 0x7F000000, 0x34000000)
> +__AARCH64_INSN_FUNCS(cbnz, 0x7F000000, 0x35000000)
> +__AARCH64_INSN_FUNCS(tbz, 0x7F000000, 0x36000000)
> +__AARCH64_INSN_FUNCS(tbnz, 0x7F000000, 0x37000000)
> __AARCH64_INSN_FUNCS(bcond, 0xFF000010, 0x54000000)
> __AARCH64_INSN_FUNCS(svc, 0xFFE0001F, 0xD4000001)
> __AARCH64_INSN_FUNCS(hvc, 0xFFE0001F, 0xD4000002)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arm64: insn: fix compare-and-branch encodings
2015-02-18 16:08 ` Robin Murphy
@ 2015-02-19 19:33 ` Z Lim
0 siblings, 0 replies; 3+ messages in thread
From: Z Lim @ 2015-02-19 19:33 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Feb 18, 2015 at 8:08 AM, Robin Murphy <robin.murphy@arm.com> wrote:
> Oops, missed some CCs...
>
> On 18/02/15 15:40, Robin Murphy wrote:
>>
>> Fix cbz/cbnz having the mask offset by a bit, and add encodings for
>> tbz/tbnz so that all branch forms are represented.
>>
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>> Acked-by: Will Deacon <will.deacon@arm.com>
>> ---
>> arch/arm64/include/asm/insn.h | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/include/asm/insn.h b/arch/arm64/include/asm/insn.h
>> index e2ff32a..d2f4942 100644
>> --- a/arch/arm64/include/asm/insn.h
>> +++ b/arch/arm64/include/asm/insn.h
>> @@ -264,8 +264,10 @@ __AARCH64_INSN_FUNCS(ands, 0x7F200000, 0x6A000000)
>> __AARCH64_INSN_FUNCS(bics, 0x7F200000, 0x6A200000)
>> __AARCH64_INSN_FUNCS(b, 0xFC000000, 0x14000000)
>> __AARCH64_INSN_FUNCS(bl, 0xFC000000, 0x94000000)
>> -__AARCH64_INSN_FUNCS(cbz, 0xFE000000, 0x34000000)
>> -__AARCH64_INSN_FUNCS(cbnz, 0xFE000000, 0x35000000)
>> +__AARCH64_INSN_FUNCS(cbz, 0x7F000000, 0x34000000)
>> +__AARCH64_INSN_FUNCS(cbnz, 0x7F000000, 0x35000000)
>> +__AARCH64_INSN_FUNCS(tbz, 0x7F000000, 0x36000000)
>> +__AARCH64_INSN_FUNCS(tbnz, 0x7F000000, 0x37000000)
>> __AARCH64_INSN_FUNCS(bcond, 0xFF000010, 0x54000000)
>> __AARCH64_INSN_FUNCS(svc, 0xFFE0001F, 0xD4000001)
>> __AARCH64_INSN_FUNCS(hvc, 0xFFE0001F, 0xD4000002)
>>
Looks good to me, as described in ARMv8 ARM.
Acked-by: Zi Shen Lim <zlim.lnx@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-19 19:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 15:40 [PATCH] arm64: insn: fix compare-and-branch encodings Robin Murphy
2015-02-18 16:08 ` Robin Murphy
2015-02-19 19:33 ` Z Lim
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 NNTP newsgroup(s).