Re: [PATCH v1 29/43] target/loongarch: Add timer related instructions support.

2022-04-17 Thread Richard Henderson
On 4/15/22 02:40, Xiaojuan Yang wrote: +uint64_t helper_rdtime_d(CPULoongArchState *env) +{ +LoongArchCPU *cpu = LOONGARCH_CPU(env_cpu(env)); + +if ((env->CSR_MISC >> 7) & 0x1) { +do_raise_exception(env, EXCCODE_IPE, GETPC()); This isn't correct -- you need to extract bit 4 +

[PATCH v1 29/43] target/loongarch: Add timer related instructions support.

2022-04-15 Thread Xiaojuan Yang
This includes: -RDTIME{L/H}.W -RDTIME.D Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 3 ++ target/loongarch/helper.h | 2 ++ target/loongarch/insn_trans/trans_extra.c.inc | 33 +++