|
| From: | Richard Henderson |
| Subject: | Re: [PATCH v2 2/4] target/ppc: Move VSX vector with length storage access insns to decodetree. |
| Date: | Sun, 16 Jun 2024 12:13:48 -0700 |
| User-agent: | Mozilla Thunderbird |
On 6/13/24 02:33, Chinmay Rath wrote:
+/* EA <- (ra == 0) ? 0 : GPR[ra] */
+static TCGv do_ea_calc_ra(DisasContext *ctx, int ra)
+{
+ TCGv EA;
+ if (!ra) {
+ EA = tcg_constant_tl(0);
+ return EA;
+ }
+ EA = tcg_temp_new();
+ if (NARROW_MODE(ctx)) {
+ tcg_gen_ext32u_tl(EA, cpu_gpr[ra]);
+ } else {
+ tcg_gen_mov_tl(EA, cpu_gpr[ra]);
Why are you making a copy, rather than just returning cpu_gpr[ra]? If you need to modify the resulting EA, then you also need to make a copy for 0. r~
| [Prev in Thread] | Current Thread | [Next in Thread] |