qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 07/10] target/i386: introduce gen_jr helper t


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 07/10] target/i386: introduce gen_jr helper to generate lookup_and_goto_ptr
Date: Wed, 26 Apr 2017 10:26:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 04/26/2017 08:23 AM, Emilio G. Cota wrote:
+gen_eob_worker(DisasContext *s, bool inhibit, bool recheck_tf, TCGv jr)
  {
      gen_update_cc_op(s);
@@ -2530,6 +2532,13 @@ static void gen_eob_worker(DisasContext *s, bool inhibit, bool recheck_tf)
          tcg_gen_exit_tb(0);
      } else if (s->tf) {
          gen_helper_single_step(cpu_env);
+    } else if (jr) {
...
-        gen_eob_worker(s, false, true);
+        gen_eob_worker(s, false, true, NULL);

You cannot use NULL. While we abuse a pointer type for TCGv, that's because C doesn't have type verification for different integral types.

You need to use

    TCGv unused;
    TCGV_UNUSED(unused);

and

    if (TCGV_IS_UNUSED(foo))

(As it happens, I do have a branch that tries to clean this up, so that this kind of thing is less unwieldy. Perhaps I'll get to it this cycle...)

+        tcg_gen_ld_tl(vaddr, cpu_env, offsetof(CPUX86State, segs[R_CS].base));
+        tcg_gen_add_tl(vaddr, vaddr, jr);

tcg_gen_add_tl(vaddr, jr, cpu_seg_base[R_CS]);


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]