qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v14 11/33] target-tilegx: Framework for decoding


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v14 11/33] target-tilegx: Framework for decoding bundles
Date: Mon, 31 Aug 2015 18:58:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 08/29/2015 02:08 PM, Peter Maydell wrote:
On 24 August 2015 at 17:17, Richard Henderson <address@hidden> wrote:
Signed-off-by: Richard Henderson <address@hidden>
+    if (dc->jmp.cond != TCG_COND_NEVER) {
+        if (dc->jmp.cond == TCG_COND_ALWAYS) {
+            tcg_gen_mov_i64(cpu_pc, dc->jmp.dest);
+        } else {
+            TCGv next = tcg_const_i64(dc->pc + TILEGX_BUNDLE_SIZE_IN_BYTES);
+            tcg_gen_movcond_i64(dc->jmp.cond, cpu_pc,
+                                dc->jmp.val1, load_zero(dc),
+                                dc->jmp.dest, next);
+            tcg_temp_free_i64(dc->jmp.val1);
+            tcg_temp_free_i64(next);
+        }
+        tcg_temp_free_i64(dc->jmp.dest);
+        tcg_gen_exit_tb(0);
+        dc->exit_tb = true;
+    }

Doing conditional branches with movcond to pc means we'll
never be able to link TBs which end with conditional branches,
right?

The structure of the code is such that we could use goto_tb.
I just didn't want to complicate the initial implementation.


r~




reply via email to

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