[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] target/openrisc: Do not reset delay slot flag on early tb ex
From: |
Stafford Horne |
Subject: |
Re: [PATCH] target/openrisc: Do not reset delay slot flag on early tb exit |
Date: |
Thu, 12 May 2022 21:47:39 +0900 |
On Wed, May 11, 2022 at 07:11:20PM -0700, Richard Henderson wrote:
> On 5/11/22 15:34, Stafford Horne wrote:
> > In this case I don't see how the tb->flag would be updated, ooh, I guess it
> > would have been set earlier when the TB was generated. Maybe that is what
> > I am
> > missing.
>
> Correct, it should be unchanged (and correct) from generation.
OK, its very clear now thanks.
With that said, I am still not convinced we need something like:
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -37,6 +37,7 @@ static void openrisc_cpu_synchronize_from_tb(CPUState *cs,
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
cpu->env.pc = tb->pc;
+ cpu->env.dflag = (tb->flags & TB_FLAGS_DFLAG) ? 1 : 0;
}
I will leave it out for now as I feel comfortable that the env.dflag will be
correct. But if you think of something let me know.
-Stafford