qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/sh4: Fix TB_FLAG_UNALIGN


From: Yoshinori Sato
Subject: Re: [PATCH] target/sh4: Fix TB_FLAG_UNALIGN
Date: Wed, 31 Aug 2022 10:30:15 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

On Tue, 30 Aug 2022 01:10:29 +0900,
Richard Henderson wrote:
> 
> On 8/29/22 02:05, BALATON Zoltan wrote:
> > On Sun, 28 Aug 2022, Richard Henderson wrote:
> >> The value previously chosen overlaps GUSA_MASK.
> >> 
> >> Cc: qemu-stable@nongnu.org
> >> Fixes: 4da06fb3062 ("target/sh4: Implement prctl_unalign_sigbus")
> >> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/856
> >> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> >> ---
> >> target/sh4/cpu.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h
> >> index 9f15ef913c..e79cbc59e2 100644
> >> --- a/target/sh4/cpu.h
> >> +++ b/target/sh4/cpu.h
> >> @@ -84,7 +84,7 @@
> >> #define DELAY_SLOT_RTE         (1 << 2)
> >> 
> >> #define TB_FLAG_PENDING_MOVCA  (1 << 3)
> >> -#define TB_FLAG_UNALIGN        (1 << 4)
> >> +#define TB_FLAG_UNALIGN        (1 << 13)
> > 
> > Is it worth a comment to note why that value to avoid the same
> > problem if another flag is added in the future?
> 
> Hmm, or perhaps move it down below, so that we see bit 3 used, then bits 
> 4-12, then bit 13.
> 
> 
> r~

It looks like the gUSA and unalign access flags are mixed.
I think the flags should also be separated as the two features are not related.

-- 
Yosinori Sato



reply via email to

[Prev in Thread] Current Thread [Next in Thread]