On 4/8/21 8:20 AM, Alistair Francis wrote:
target_ulong sd = is_32bit(ctx) ? MSTATUS32_SD : MSTATUS64_SD;
It turns out clang doesn't like this, so I might still be stuck with ifdefs.
I think we need
#ifdef TARGET_RISCV32
#define is_32bit(ctx) true
#else
...
#endif
based on
$ cat
On Mon, Apr 5, 2021 at 11:10 AM Richard Henderson
wrote:
>
> On 4/2/21 1:02 PM, Alistair Francis wrote:
> > @@ -369,6 +369,9 @@ static void gen_jal(DisasContext *ctx, int rd,
> > target_ulong imm)
> > static void mark_fs_dirty(DisasContext *ctx)
> > {
> > TCGv tmp;
> > +CPUState
On Mon, Apr 5, 2021 at 11:10 AM Richard Henderson
wrote:
>
> On 4/2/21 1:02 PM, Alistair Francis wrote:
> > @@ -369,6 +369,9 @@ static void gen_jal(DisasContext *ctx, int rd,
> > target_ulong imm)
> > static void mark_fs_dirty(DisasContext *ctx)
> > {
> > TCGv tmp;
> > +CPUState
On 4/2/21 1:02 PM, Alistair Francis wrote:
@@ -369,6 +369,9 @@ static void gen_jal(DisasContext *ctx, int rd, target_ulong
imm)
static void mark_fs_dirty(DisasContext *ctx)
{
TCGv tmp;
+CPUState *cpu = ctx->cs;
+CPURISCVState *env = cpu->env_ptr;
+
if (ctx->mstatus_fs ==
Signed-off-by: Alistair Francis
---
target/riscv/cpu_bits.h | 10 --
target/riscv/csr.c | 12 ++--
target/riscv/translate.c | 19 +--
3 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h
index