Re: [RFC PATCH v7 09/29] target/loongarch: Add TLB instruction support

2022-03-30 Thread yangxiaojuan
On 2022/3/29 上午4:12, Richard Henderson wrote: On 3/28/22 06:57, Xiaojuan Yang wrote: +static void output_empty(DisasContext *ctx, arg_empty *a, + const char *mnemonic) +{ +} No, you must still do     output(ctx, mnemonic, ""); +static bool trans_tlbwr(DisasContext

Re: [RFC PATCH v7 09/29] target/loongarch: Add TLB instruction support

2022-03-28 Thread Richard Henderson
On 3/28/22 06:57, Xiaojuan Yang wrote: +void helper_tlbflush(CPULoongArchState *env) +{ +int i, index; + +index = FIELD_EX64(env->CSR_TLBIDX, CSR_TLBIDX, INDEX); + +if (index < LOONGARCH_STLB) { +/* STLB. One line per operation */ +for (i = 0; i < 8; i++) { +

Re: [RFC PATCH v7 09/29] target/loongarch: Add TLB instruction support

2022-03-28 Thread Richard Henderson
On 3/28/22 06:57, Xiaojuan Yang wrote: +static void output_empty(DisasContext *ctx, arg_empty *a, + const char *mnemonic) +{ +} No, you must still do output(ctx, mnemonic, ""); +static bool trans_tlbwr(DisasContext *ctx, arg_tlbwr *a) +{ +if (check_plv(ctx))

[RFC PATCH v7 09/29] target/loongarch: Add TLB instruction support

2022-03-28 Thread Xiaojuan Yang
This includes: - TLBSRCH - TLBRD - TLBWR - TLBFILL - TLBCLR - TLBFLUSH - INVTLB Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 17 + target/loongarch/helper.h | 12 + .../insn_trans/trans_privileged.c.inc |