On 06/29/2017 03:52 PM, Emilio G. Cota wrote:
On Wed, Jun 28, 2017 at 15:20:42 +0300, Lluís Vilanova wrote:
Needed to implement a target-agnostic gen_intermediate_code() in the
future.

Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu>
Reviewed-by: David Gibson <da...@gibson.dropbear.id.au>
Reviewed-by: Richard Henderson <r...@twiddle.net>
---
(snip)
-void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb)
+void gen_intermediate_code(CPUState *cpu, struct TranslationBlock *tb)
  {
-    AlphaCPU *cpu = alpha_env_get_cpu(env);
-    CPUState *cs = CPU(cpu);
+    CPUAlphaState *env = cpu->env_ptr;

I'd keep the original variable names, i.e. cs for CPUState in this case,
just like you did for a64:

-void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb)
+void gen_intermediate_code_a64(CPUState *cs, TranslationBlock *tb)
  {
-    CPUState *cs = CPU(cpu);
-    CPUARMState *env = &cpu->env;
+    CPUARMState *env = cs->env_ptr;
+    ARMCPU *cpu = arm_env_get_cpu(env);

This will keep the diff size to a minimum.

I asked for the same thing many revisions ago.


r~

Reply via email to