[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 7/9] target-arm: Simplify insn_crosse
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 7/9] target-arm: Simplify insn_crosses_page() |
Date: |
Tue, 10 Oct 2017 19:26:13 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/09/2017 06:48 AM, Peter Maydell wrote:
> Recent changes have left insn_crosses_page() more complicated
> than it needed to be:
> * it's only called from thumb_tr_translate_insn() so we know
> for certain that we're looking at a Thumb insn
> * the caller's check for dc->pc >= dc->next_page_start - 3
> means that dc->pc can't possibly be 4 aligned, so there's
> no need to check that (the check was partly there to ensure
> that we didn't treat an ARM insn as Thumb, I think)
> * we now have thumb_insn_is_16bit() which lets us do a precise
> check of the length of the next insn, rather than opencoding
> an inaccurate check
>
> Simplify it down to just loading the first half of the insn
> and calling thumb_insn_is_16bit() on it.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> target/arm/translate.c | 27 ++++++---------------------
> 1 file changed, 6 insertions(+), 21 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-arm] [PATCH 0/9] v8M: BLXNS, SG, secure function return, Peter Maydell, 2017/10/09
- [Qemu-arm] [PATCH 7/9] target-arm: Simplify insn_crosses_page(), Peter Maydell, 2017/10/09
- Re: [Qemu-arm] [Qemu-devel] [PATCH 7/9] target-arm: Simplify insn_crosses_page(),
Richard Henderson <=
- [Qemu-arm] [PATCH 6/9] target/arm: Pull Thumb insn word loads up to top level, Peter Maydell, 2017/10/09
- [Qemu-arm] [PATCH 9/9] target/arm: Implement SG instruction corner cases, Peter Maydell, 2017/10/09
- [Qemu-arm] [PATCH 3/9] target/arm: Implement BLXNS, Peter Maydell, 2017/10/09
- [Qemu-arm] [PATCH 5/9] target-arm: Don't check for "Thumb2 or M profile" for not-Thumb1, Peter Maydell, 2017/10/09
- [Qemu-arm] [PATCH 2/9] target/arm: Implement SG instruction, Peter Maydell, 2017/10/09