Re: [PATCH 2/3] RISC-V: use FIELD macro to define tb flags

2020-01-13 Thread Richard Henderson
On 1/9/20 10:12 PM, LIU Zhiwei wrote: > if (riscv_cpu_fp_enabled(env)) { > -*flags |= TB_FLAGS_MSTATUS_FS; > +flags = FIELD_DP32(flags, TB_FLAGS, FS, (env->mstatus & MSTATUS_FS)); > } This is wrong. You're inserting the low two bits of env->mstatus & MSTATUS_FS into

[PATCH 2/3] RISC-V: use FIELD macro to define tb flags

2020-01-10 Thread LIU Zhiwei
FIELD is more unified to define tb flags. It is easier to add new filed to tb flags. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 15 +-- target/riscv/translate.c | 5 +++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv