Message ID | 20200828141929.77854-24-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | target/microblaze improvements | expand |
Le ven. 28 août 2020 16:36, Richard Henderson <richard.henderson@linaro.org> a écrit : > This is cpu_imm, cpu_btaken, cpu_iflags, cpu_res_addr and cpu_res_val. > It is standard for these file-scope globals to begin with cpu_*. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- > target/microblaze/translate.c | 54 +++++++++++++++++------------------ > 1 file changed, 27 insertions(+), 27 deletions(-) > > diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c > index ecfa6b86a4..9aa63ddcc5 100644 > --- a/target/microblaze/translate.c > +++ b/target/microblaze/translate.c > @@ -56,12 +56,12 @@ > static TCGv_i32 cpu_R[32]; > static TCGv_i32 cpu_pc; > static TCGv_i32 cpu_msr; > -static TCGv_i32 env_imm; > -static TCGv_i32 env_btaken; > +static TCGv_i32 cpu_imm; > +static TCGv_i32 cpu_btaken; > static TCGv_i32 cpu_btarget; > -static TCGv_i32 env_iflags; > -static TCGv env_res_addr; > -static TCGv_i32 env_res_val; > +static TCGv_i32 cpu_iflags; > +static TCGv cpu_res_addr; > +static TCGv_i32 cpu_res_val; > > #include "exec/gen-icount.h" > > @@ -107,7 +107,7 @@ static inline void t_sync_flags(DisasContext *dc) > { > /* Synch the tb dependent flags between translator and runtime. */ > if (dc->tb_flags != dc->synced_flags) { > - tcg_gen_movi_i32(env_iflags, dc->tb_flags); > + tcg_gen_movi_i32(cpu_iflags, dc->tb_flags); > dc->synced_flags = dc->tb_flags; > } > } > @@ -222,10 +222,10 @@ static inline TCGv_i32 *dec_alu_op_b(DisasContext > *dc) > { > if (dc->type_b) { > if (dc->tb_flags & IMM_FLAG) > - tcg_gen_ori_i32(env_imm, env_imm, dc->imm); > + tcg_gen_ori_i32(cpu_imm, cpu_imm, dc->imm); > else > - tcg_gen_movi_i32(env_imm, (int32_t)((int16_t)dc->imm)); > - return &env_imm; > + tcg_gen_movi_i32(cpu_imm, (int32_t)((int16_t)dc->imm)); > + return &cpu_imm; > } else > return &cpu_R[dc->rb]; > } > @@ -859,7 +859,7 @@ static inline void sync_jmpstate(DisasContext *dc) > { > if (dc->jmp == JMP_DIRECT || dc->jmp == JMP_DIRECT_CC) { > if (dc->jmp == JMP_DIRECT) { > - tcg_gen_movi_i32(env_btaken, 1); > + tcg_gen_movi_i32(cpu_btaken, 1); > } > dc->jmp = JMP_INDIRECT; > tcg_gen_movi_i32(cpu_btarget, dc->jmp_pc); > @@ -869,7 +869,7 @@ static inline void sync_jmpstate(DisasContext *dc) > static void dec_imm(DisasContext *dc) > { > LOG_DIS("imm %x\n", dc->imm << 16); > - tcg_gen_movi_i32(env_imm, (dc->imm << 16)); > + tcg_gen_movi_i32(cpu_imm, (dc->imm << 16)); > dc->tb_flags |= IMM_FLAG; > dc->clear_imm = 0; > } > @@ -1040,8 +1040,8 @@ static void dec_load(DisasContext *dc) > } > > if (ex) { > - tcg_gen_mov_tl(env_res_addr, addr); > - tcg_gen_mov_i32(env_res_val, v); > + tcg_gen_mov_tl(cpu_res_addr, addr); > + tcg_gen_mov_i32(cpu_res_val, v); > } > if (dc->rd) { > tcg_gen_mov_i32(cpu_R[dc->rd], v); > @@ -1103,7 +1103,7 @@ static void dec_store(DisasContext *dc) > > write_carryi(dc, 1); > swx_skip = gen_new_label(); > - tcg_gen_brcond_tl(TCG_COND_NE, env_res_addr, addr, swx_skip); > + tcg_gen_brcond_tl(TCG_COND_NE, cpu_res_addr, addr, swx_skip); > > /* > * Compare the value loaded at lwx with current contents of > @@ -1111,11 +1111,11 @@ static void dec_store(DisasContext *dc) > */ > tval = tcg_temp_new_i32(); > > - tcg_gen_atomic_cmpxchg_i32(tval, addr, env_res_val, > + tcg_gen_atomic_cmpxchg_i32(tval, addr, cpu_res_val, > cpu_R[dc->rd], mem_index, > mop); > > - tcg_gen_brcond_i32(TCG_COND_NE, env_res_val, tval, swx_skip); > + tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_val, tval, swx_skip); > write_carryi(dc, 0); > tcg_temp_free_i32(tval); > } > @@ -1204,7 +1204,7 @@ static void eval_cond_jmp(DisasContext *dc, TCGv_i32 > pc_true, TCGv_i32 pc_false) > TCGv_i32 zero = tcg_const_i32(0); > > tcg_gen_movcond_i32(TCG_COND_NE, cpu_pc, > - env_btaken, zero, > + cpu_btaken, zero, > pc_true, pc_false); > > tcg_temp_free_i32(zero); > @@ -1245,7 +1245,7 @@ static void dec_bcc(DisasContext *dc) > dc->jmp = JMP_INDIRECT; > tcg_gen_addi_i32(cpu_btarget, *dec_alu_op_b(dc), dc->pc); > } > - eval_cc(dc, cc, env_btaken, cpu_R[dc->ra]); > + eval_cc(dc, cc, cpu_btaken, cpu_R[dc->ra]); > } > > static void dec_br(DisasContext *dc) > @@ -1311,7 +1311,7 @@ static void dec_br(DisasContext *dc) > > dc->jmp = JMP_INDIRECT; > if (abs) { > - tcg_gen_movi_i32(env_btaken, 1); > + tcg_gen_movi_i32(cpu_btaken, 1); > tcg_gen_mov_i32(cpu_btarget, *(dec_alu_op_b(dc))); > if (link && !dslot) { > if (!(dc->tb_flags & IMM_FLAG) && > @@ -1330,7 +1330,7 @@ static void dec_br(DisasContext *dc) > dc->jmp = JMP_DIRECT; > dc->jmp_pc = dc->pc + (int32_t)((int16_t)dc->imm); > } else { > - tcg_gen_movi_i32(env_btaken, 1); > + tcg_gen_movi_i32(cpu_btaken, 1); > tcg_gen_addi_i32(cpu_btarget, *dec_alu_op_b(dc), dc->pc); > } > } > @@ -1419,7 +1419,7 @@ static void dec_rts(DisasContext *dc) > LOG_DIS("rts ir=%x\n", dc->ir); > > dc->jmp = JMP_INDIRECT; > - tcg_gen_movi_i32(env_btaken, 1); > + tcg_gen_movi_i32(cpu_btaken, 1); > tcg_gen_add_i32(cpu_btarget, cpu_R[dc->ra], *dec_alu_op_b(dc)); > } > > @@ -1722,7 +1722,7 @@ void gen_intermediate_code(CPUState *cs, > TranslationBlock *tb, int max_insns) > TCGLabel *l1 = gen_new_label(); > t_sync_flags(dc); > /* Conditional jmp. */ > - tcg_gen_brcondi_i32(TCG_COND_NE, env_btaken, 0, l1); > + tcg_gen_brcondi_i32(TCG_COND_NE, cpu_btaken, 0, l1); > gen_goto_tb(dc, 1, dc->pc); > gen_set_label(l1); > gen_goto_tb(dc, 0, dc->jmp_pc); > @@ -1848,22 +1848,22 @@ void mb_tcg_init(void) > { > int i; > > - env_iflags = tcg_global_mem_new_i32(cpu_env, > + cpu_iflags = tcg_global_mem_new_i32(cpu_env, > offsetof(CPUMBState, iflags), > "iflags"); > - env_imm = tcg_global_mem_new_i32(cpu_env, > + cpu_imm = tcg_global_mem_new_i32(cpu_env, > offsetof(CPUMBState, imm), > "imm"); > cpu_btarget = tcg_global_mem_new_i32(cpu_env, > offsetof(CPUMBState, btarget), > "btarget"); > - env_btaken = tcg_global_mem_new_i32(cpu_env, > + cpu_btaken = tcg_global_mem_new_i32(cpu_env, > offsetof(CPUMBState, btaken), > "btaken"); > - env_res_addr = tcg_global_mem_new(cpu_env, > + cpu_res_addr = tcg_global_mem_new(cpu_env, > offsetof(CPUMBState, res_addr), > "res_addr"); > - env_res_val = tcg_global_mem_new_i32(cpu_env, > + cpu_res_val = tcg_global_mem_new_i32(cpu_env, > offsetof(CPUMBState, res_val), > "res_val"); > for (i = 0; i < ARRAY_SIZE(cpu_R); i++) { > -- > 2.25.1 > > > <div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 28 août 2020 16:36, Richard Henderson <<a href="mailto:richard.henderson@linaro.org">richard.henderson@linaro.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is cpu_imm, cpu_btaken, cpu_iflags, cpu_res_addr and cpu_res_val.<br> It is standard for these file-scope globals to begin with cpu_*.<br> <br> Signed-off-by: Richard Henderson <<a href="mailto:richard.henderson@linaro.org" target="_blank" rel="noreferrer">richard.henderson@linaro.org</a>><br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif;font-size:13.696px">Reviewed-by: Philippe Mathieu-Daudé <</span><a href="mailto:f4bug@amsat.org" style="text-decoration:none;color:rgb(66,133,244);font-family:sans-serif;font-size:13.696px">f4bug@amsat.org</a><span style="font-family:sans-serif;font-size:13.696px">></span><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> ---<br> target/microblaze/translate.c | 54 +++++++++++++++++------------------<br> 1 file changed, 27 insertions(+), 27 deletions(-)<br> <br> diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c<br> index ecfa6b86a4..9aa63ddcc5 100644<br> --- a/target/microblaze/translate.c<br> +++ b/target/microblaze/translate.c<br> @@ -56,12 +56,12 @@<br> static TCGv_i32 cpu_R[32];<br> static TCGv_i32 cpu_pc;<br> static TCGv_i32 cpu_msr;<br> -static TCGv_i32 env_imm;<br> -static TCGv_i32 env_btaken;<br> +static TCGv_i32 cpu_imm;<br> +static TCGv_i32 cpu_btaken;<br> static TCGv_i32 cpu_btarget;<br> -static TCGv_i32 env_iflags;<br> -static TCGv env_res_addr;<br> -static TCGv_i32 env_res_val;<br> +static TCGv_i32 cpu_iflags;<br> +static TCGv cpu_res_addr;<br> +static TCGv_i32 cpu_res_val;<br> <br> #include "exec/gen-icount.h"<br> <br> @@ -107,7 +107,7 @@ static inline void t_sync_flags(DisasContext *dc)<br> {<br> /* Synch the tb dependent flags between translator and runtime. */<br> if (dc->tb_flags != dc->synced_flags) {<br> - tcg_gen_movi_i32(env_iflags, dc->tb_flags);<br> + tcg_gen_movi_i32(cpu_iflags, dc->tb_flags);<br> dc->synced_flags = dc->tb_flags;<br> }<br> }<br> @@ -222,10 +222,10 @@ static inline TCGv_i32 *dec_alu_op_b(DisasContext *dc)<br> {<br> if (dc->type_b) {<br> if (dc->tb_flags & IMM_FLAG)<br> - tcg_gen_ori_i32(env_imm, env_imm, dc->imm);<br> + tcg_gen_ori_i32(cpu_imm, cpu_imm, dc->imm);<br> else<br> - tcg_gen_movi_i32(env_imm, (int32_t)((int16_t)dc->imm));<br> - return &env_imm;<br> + tcg_gen_movi_i32(cpu_imm, (int32_t)((int16_t)dc->imm));<br> + return &cpu_imm;<br> } else<br> return &cpu_R[dc->rb];<br> }<br> @@ -859,7 +859,7 @@ static inline void sync_jmpstate(DisasContext *dc)<br> {<br> if (dc->jmp == JMP_DIRECT || dc->jmp == JMP_DIRECT_CC) {<br> if (dc->jmp == JMP_DIRECT) {<br> - tcg_gen_movi_i32(env_btaken, 1);<br> + tcg_gen_movi_i32(cpu_btaken, 1);<br> }<br> dc->jmp = JMP_INDIRECT;<br> tcg_gen_movi_i32(cpu_btarget, dc->jmp_pc);<br> @@ -869,7 +869,7 @@ static inline void sync_jmpstate(DisasContext *dc)<br> static void dec_imm(DisasContext *dc)<br> {<br> LOG_DIS("imm %x\n", dc->imm << 16);<br> - tcg_gen_movi_i32(env_imm, (dc->imm << 16));<br> + tcg_gen_movi_i32(cpu_imm, (dc->imm << 16));<br> dc->tb_flags |= IMM_FLAG;<br> dc->clear_imm = 0;<br> }<br> @@ -1040,8 +1040,8 @@ static void dec_load(DisasContext *dc)<br> }<br> <br> if (ex) {<br> - tcg_gen_mov_tl(env_res_addr, addr);<br> - tcg_gen_mov_i32(env_res_val, v);<br> + tcg_gen_mov_tl(cpu_res_addr, addr);<br> + tcg_gen_mov_i32(cpu_res_val, v);<br> }<br> if (dc->rd) {<br> tcg_gen_mov_i32(cpu_R[dc->rd], v);<br> @@ -1103,7 +1103,7 @@ static void dec_store(DisasContext *dc)<br> <br> write_carryi(dc, 1);<br> swx_skip = gen_new_label();<br> - tcg_gen_brcond_tl(TCG_COND_NE, env_res_addr, addr, swx_skip);<br> + tcg_gen_brcond_tl(TCG_COND_NE, cpu_res_addr, addr, swx_skip);<br> <br> /*<br> * Compare the value loaded at lwx with current contents of<br> @@ -1111,11 +1111,11 @@ static void dec_store(DisasContext *dc)<br> */<br> tval = tcg_temp_new_i32();<br> <br> - tcg_gen_atomic_cmpxchg_i32(tval, addr, env_res_val,<br> + tcg_gen_atomic_cmpxchg_i32(tval, addr, cpu_res_val,<br> cpu_R[dc->rd], mem_index,<br> mop);<br> <br> - tcg_gen_brcond_i32(TCG_COND_NE, env_res_val, tval, swx_skip);<br> + tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_val, tval, swx_skip);<br> write_carryi(dc, 0);<br> tcg_temp_free_i32(tval);<br> }<br> @@ -1204,7 +1204,7 @@ static void eval_cond_jmp(DisasContext *dc, TCGv_i32 pc_true, TCGv_i32 pc_false)<br> TCGv_i32 zero = tcg_const_i32(0);<br> <br> tcg_gen_movcond_i32(TCG_COND_NE, cpu_pc,<br> - env_btaken, zero,<br> + cpu_btaken, zero,<br> pc_true, pc_false);<br> <br> tcg_temp_free_i32(zero);<br> @@ -1245,7 +1245,7 @@ static void dec_bcc(DisasContext *dc)<br> dc->jmp = JMP_INDIRECT;<br> tcg_gen_addi_i32(cpu_btarget, *dec_alu_op_b(dc), dc->pc);<br> }<br> - eval_cc(dc, cc, env_btaken, cpu_R[dc->ra]);<br> + eval_cc(dc, cc, cpu_btaken, cpu_R[dc->ra]);<br> }<br> <br> static void dec_br(DisasContext *dc)<br> @@ -1311,7 +1311,7 @@ static void dec_br(DisasContext *dc)<br> <br> dc->jmp = JMP_INDIRECT;<br> if (abs) {<br> - tcg_gen_movi_i32(env_btaken, 1);<br> + tcg_gen_movi_i32(cpu_btaken, 1);<br> tcg_gen_mov_i32(cpu_btarget, *(dec_alu_op_b(dc)));<br> if (link && !dslot) {<br> if (!(dc->tb_flags & IMM_FLAG) &&<br> @@ -1330,7 +1330,7 @@ static void dec_br(DisasContext *dc)<br> dc->jmp = JMP_DIRECT;<br> dc->jmp_pc = dc->pc + (int32_t)((int16_t)dc->imm);<br> } else {<br> - tcg_gen_movi_i32(env_btaken, 1);<br> + tcg_gen_movi_i32(cpu_btaken, 1);<br> tcg_gen_addi_i32(cpu_btarget, *dec_alu_op_b(dc), dc->pc);<br> }<br> }<br> @@ -1419,7 +1419,7 @@ static void dec_rts(DisasContext *dc)<br> LOG_DIS("rts ir=%x\n", dc->ir);<br> <br> dc->jmp = JMP_INDIRECT;<br> - tcg_gen_movi_i32(env_btaken, 1);<br> + tcg_gen_movi_i32(cpu_btaken, 1);<br> tcg_gen_add_i32(cpu_btarget, cpu_R[dc->ra], *dec_alu_op_b(dc));<br> }<br> <br> @@ -1722,7 +1722,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)<br> TCGLabel *l1 = gen_new_label();<br> t_sync_flags(dc);<br> /* Conditional jmp. */<br> - tcg_gen_brcondi_i32(TCG_COND_NE, env_btaken, 0, l1);<br> + tcg_gen_brcondi_i32(TCG_COND_NE, cpu_btaken, 0, l1);<br> gen_goto_tb(dc, 1, dc->pc);<br> gen_set_label(l1);<br> gen_goto_tb(dc, 0, dc->jmp_pc);<br> @@ -1848,22 +1848,22 @@ void mb_tcg_init(void)<br> {<br> int i;<br> <br> - env_iflags = tcg_global_mem_new_i32(cpu_env,<br> + cpu_iflags = tcg_global_mem_new_i32(cpu_env,<br> offsetof(CPUMBState, iflags),<br> "iflags");<br> - env_imm = tcg_global_mem_new_i32(cpu_env,<br> + cpu_imm = tcg_global_mem_new_i32(cpu_env,<br> offsetof(CPUMBState, imm),<br> "imm");<br> cpu_btarget = tcg_global_mem_new_i32(cpu_env,<br> offsetof(CPUMBState, btarget),<br> "btarget");<br> - env_btaken = tcg_global_mem_new_i32(cpu_env,<br> + cpu_btaken = tcg_global_mem_new_i32(cpu_env,<br> offsetof(CPUMBState, btaken),<br> "btaken");<br> - env_res_addr = tcg_global_mem_new(cpu_env,<br> + cpu_res_addr = tcg_global_mem_new(cpu_env,<br> offsetof(CPUMBState, res_addr),<br> "res_addr");<br> - env_res_val = tcg_global_mem_new_i32(cpu_env,<br> + cpu_res_val = tcg_global_mem_new_i32(cpu_env,<br> offsetof(CPUMBState, res_val),<br> "res_val");<br> for (i = 0; i < ARRAY_SIZE(cpu_R); i++) {<br> -- <br> 2.25.1<br> <br> <br> </blockquote></div></div></div>
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index ecfa6b86a4..9aa63ddcc5 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -56,12 +56,12 @@ static TCGv_i32 cpu_R[32]; static TCGv_i32 cpu_pc; static TCGv_i32 cpu_msr; -static TCGv_i32 env_imm; -static TCGv_i32 env_btaken; +static TCGv_i32 cpu_imm; +static TCGv_i32 cpu_btaken; static TCGv_i32 cpu_btarget; -static TCGv_i32 env_iflags; -static TCGv env_res_addr; -static TCGv_i32 env_res_val; +static TCGv_i32 cpu_iflags; +static TCGv cpu_res_addr; +static TCGv_i32 cpu_res_val; #include "exec/gen-icount.h" @@ -107,7 +107,7 @@ static inline void t_sync_flags(DisasContext *dc) { /* Synch the tb dependent flags between translator and runtime. */ if (dc->tb_flags != dc->synced_flags) { - tcg_gen_movi_i32(env_iflags, dc->tb_flags); + tcg_gen_movi_i32(cpu_iflags, dc->tb_flags); dc->synced_flags = dc->tb_flags; } } @@ -222,10 +222,10 @@ static inline TCGv_i32 *dec_alu_op_b(DisasContext *dc) { if (dc->type_b) { if (dc->tb_flags & IMM_FLAG) - tcg_gen_ori_i32(env_imm, env_imm, dc->imm); + tcg_gen_ori_i32(cpu_imm, cpu_imm, dc->imm); else - tcg_gen_movi_i32(env_imm, (int32_t)((int16_t)dc->imm)); - return &env_imm; + tcg_gen_movi_i32(cpu_imm, (int32_t)((int16_t)dc->imm)); + return &cpu_imm; } else return &cpu_R[dc->rb]; } @@ -859,7 +859,7 @@ static inline void sync_jmpstate(DisasContext *dc) { if (dc->jmp == JMP_DIRECT || dc->jmp == JMP_DIRECT_CC) { if (dc->jmp == JMP_DIRECT) { - tcg_gen_movi_i32(env_btaken, 1); + tcg_gen_movi_i32(cpu_btaken, 1); } dc->jmp = JMP_INDIRECT; tcg_gen_movi_i32(cpu_btarget, dc->jmp_pc); @@ -869,7 +869,7 @@ static inline void sync_jmpstate(DisasContext *dc) static void dec_imm(DisasContext *dc) { LOG_DIS("imm %x\n", dc->imm << 16); - tcg_gen_movi_i32(env_imm, (dc->imm << 16)); + tcg_gen_movi_i32(cpu_imm, (dc->imm << 16)); dc->tb_flags |= IMM_FLAG; dc->clear_imm = 0; } @@ -1040,8 +1040,8 @@ static void dec_load(DisasContext *dc) } if (ex) { - tcg_gen_mov_tl(env_res_addr, addr); - tcg_gen_mov_i32(env_res_val, v); + tcg_gen_mov_tl(cpu_res_addr, addr); + tcg_gen_mov_i32(cpu_res_val, v); } if (dc->rd) { tcg_gen_mov_i32(cpu_R[dc->rd], v); @@ -1103,7 +1103,7 @@ static void dec_store(DisasContext *dc) write_carryi(dc, 1); swx_skip = gen_new_label(); - tcg_gen_brcond_tl(TCG_COND_NE, env_res_addr, addr, swx_skip); + tcg_gen_brcond_tl(TCG_COND_NE, cpu_res_addr, addr, swx_skip); /* * Compare the value loaded at lwx with current contents of @@ -1111,11 +1111,11 @@ static void dec_store(DisasContext *dc) */ tval = tcg_temp_new_i32(); - tcg_gen_atomic_cmpxchg_i32(tval, addr, env_res_val, + tcg_gen_atomic_cmpxchg_i32(tval, addr, cpu_res_val, cpu_R[dc->rd], mem_index, mop); - tcg_gen_brcond_i32(TCG_COND_NE, env_res_val, tval, swx_skip); + tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_val, tval, swx_skip); write_carryi(dc, 0); tcg_temp_free_i32(tval); } @@ -1204,7 +1204,7 @@ static void eval_cond_jmp(DisasContext *dc, TCGv_i32 pc_true, TCGv_i32 pc_false) TCGv_i32 zero = tcg_const_i32(0); tcg_gen_movcond_i32(TCG_COND_NE, cpu_pc, - env_btaken, zero, + cpu_btaken, zero, pc_true, pc_false); tcg_temp_free_i32(zero); @@ -1245,7 +1245,7 @@ static void dec_bcc(DisasContext *dc) dc->jmp = JMP_INDIRECT; tcg_gen_addi_i32(cpu_btarget, *dec_alu_op_b(dc), dc->pc); } - eval_cc(dc, cc, env_btaken, cpu_R[dc->ra]); + eval_cc(dc, cc, cpu_btaken, cpu_R[dc->ra]); } static void dec_br(DisasContext *dc) @@ -1311,7 +1311,7 @@ static void dec_br(DisasContext *dc) dc->jmp = JMP_INDIRECT; if (abs) { - tcg_gen_movi_i32(env_btaken, 1); + tcg_gen_movi_i32(cpu_btaken, 1); tcg_gen_mov_i32(cpu_btarget, *(dec_alu_op_b(dc))); if (link && !dslot) { if (!(dc->tb_flags & IMM_FLAG) && @@ -1330,7 +1330,7 @@ static void dec_br(DisasContext *dc) dc->jmp = JMP_DIRECT; dc->jmp_pc = dc->pc + (int32_t)((int16_t)dc->imm); } else { - tcg_gen_movi_i32(env_btaken, 1); + tcg_gen_movi_i32(cpu_btaken, 1); tcg_gen_addi_i32(cpu_btarget, *dec_alu_op_b(dc), dc->pc); } } @@ -1419,7 +1419,7 @@ static void dec_rts(DisasContext *dc) LOG_DIS("rts ir=%x\n", dc->ir); dc->jmp = JMP_INDIRECT; - tcg_gen_movi_i32(env_btaken, 1); + tcg_gen_movi_i32(cpu_btaken, 1); tcg_gen_add_i32(cpu_btarget, cpu_R[dc->ra], *dec_alu_op_b(dc)); } @@ -1722,7 +1722,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns) TCGLabel *l1 = gen_new_label(); t_sync_flags(dc); /* Conditional jmp. */ - tcg_gen_brcondi_i32(TCG_COND_NE, env_btaken, 0, l1); + tcg_gen_brcondi_i32(TCG_COND_NE, cpu_btaken, 0, l1); gen_goto_tb(dc, 1, dc->pc); gen_set_label(l1); gen_goto_tb(dc, 0, dc->jmp_pc); @@ -1848,22 +1848,22 @@ void mb_tcg_init(void) { int i; - env_iflags = tcg_global_mem_new_i32(cpu_env, + cpu_iflags = tcg_global_mem_new_i32(cpu_env, offsetof(CPUMBState, iflags), "iflags"); - env_imm = tcg_global_mem_new_i32(cpu_env, + cpu_imm = tcg_global_mem_new_i32(cpu_env, offsetof(CPUMBState, imm), "imm"); cpu_btarget = tcg_global_mem_new_i32(cpu_env, offsetof(CPUMBState, btarget), "btarget"); - env_btaken = tcg_global_mem_new_i32(cpu_env, + cpu_btaken = tcg_global_mem_new_i32(cpu_env, offsetof(CPUMBState, btaken), "btaken"); - env_res_addr = tcg_global_mem_new(cpu_env, + cpu_res_addr = tcg_global_mem_new(cpu_env, offsetof(CPUMBState, res_addr), "res_addr"); - env_res_val = tcg_global_mem_new_i32(cpu_env, + cpu_res_val = tcg_global_mem_new_i32(cpu_env, offsetof(CPUMBState, res_val), "res_val"); for (i = 0; i < ARRAY_SIZE(cpu_R); i++) {
This is cpu_imm, cpu_btaken, cpu_iflags, cpu_res_addr and cpu_res_val. It is standard for these file-scope globals to begin with cpu_*. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/microblaze/translate.c | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) -- 2.25.1