[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v2 06/13] tcg: add goto_ptr opcode

From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 06/13] tcg: add goto_ptr opcode
Date: Tue, 25 Apr 2017 14:09:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 04/25/2017 09:53 AM, Emilio G. Cota wrote:
+void tcg_gen_goto_ptr(TCGv_ptr ptr)
+    if (TCG_TARGET_HAS_goto_ptr) {
+        tcg_gen_op1i(INDEX_op_goto_ptr, GET_TCGV_PTR(ptr));
+    } else {
+        tcg_gen_exit_tb(0);
+    }

I think this function should look more like

void tcg_gen_lookup_and_goto_ptr(TCGv target_addr)
    if (TCG_TARGET_HAS_goto_ptr) {
        TCGv_ptr ptr = tcg_temp_new_ptr();
        gen_helper_lookup_tb_ptr(ptr, tcg_ctx.tcg_env, addr);
        tcg_gen_op1i(INDEX_op_goto_ptr, GET_TCGV_PTR(ptr));
    } else {

since there's not really any point in all targets being exposed to the implementation detail of lookup_tb_ptr.


reply via email to

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