[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 10/42] target/arm: Implement the ADDG, SUBG instructions
From: |
Richard Henderson |
Subject: |
Re: [PATCH v7 10/42] target/arm: Implement the ADDG, SUBG instructions |
Date: |
Thu, 18 Jun 2020 09:12:40 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 6/18/20 6:17 AM, Peter Maydell wrote:
>> + imm = (imm >> 6) << LOG2_TAG_GRANULE;
...
>> + TCGv_i32 tag_offset = tcg_const_i32(imm & 15);
...
> Given that we don't really share any of the codegen with the
> existing disas_add_sub_imm() insns, and the insn format isn't
> the same (uimm6/op3/uimm4 rather than an imm12), I'm tempted
> to suggest we should structure this the same way the Arm ARM
> decode tables do, where "Add/subtract (immediate, with tags)"
> is a separate subtable from "Add/subtract (immediate)": so
> instead of disas_data_proc_imm() sending both case
> 0x22 and 0x23 to disas_add_sub_imm(), it would send 0x23
> to a new disas_add_sub_tag().
I'll do that, because...
> But this patch is functionally correct...
... I've just noticed that it isn't correct.
I drop the low 6 bits of the 12-bit "imm" on the first line, and then try to
read the low 4 bits on the second line.
Oops.
r~
- [PATCH v7 06/42] target/arm: Add DISAS_UPDATE_NOCHAIN, (continued)
- [PATCH v7 06/42] target/arm: Add DISAS_UPDATE_NOCHAIN, Richard Henderson, 2020/06/02
- [PATCH v7 07/42] target/arm: Add MTE system registers, Richard Henderson, 2020/06/02
- [PATCH v7 08/42] target/arm: Add MTE bits to tb_flags, Richard Henderson, 2020/06/02
- [PATCH v7 09/42] target/arm: Implement the IRG instruction, Richard Henderson, 2020/06/02
- [PATCH v7 10/42] target/arm: Implement the ADDG, SUBG instructions, Richard Henderson, 2020/06/02
- [PATCH v7 11/42] target/arm: Implement the GMI instruction, Richard Henderson, 2020/06/02
- [PATCH v7 13/42] target/arm: Define arm_cpu_do_unaligned_access for user-only, Richard Henderson, 2020/06/02
[PATCH v7 12/42] target/arm: Implement the SUBP instruction, Richard Henderson, 2020/06/02
[PATCH v7 14/42] target/arm: Add helper_probe_access, Richard Henderson, 2020/06/02