|
| From: | Richard Henderson |
| Subject: | Re: [Qemu-ppc] [PATCH 3/6] target-ppc: add lxsi[bw]zx instruction |
| Date: | Mon, 8 Aug 2016 10:38:14 +0530 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote:
+#define GEN_QEMU_LOAD_64(ldop, ext) \
+static void glue(gen_qemu_, glue(ldop, _i64))(DisasContext *ctx, \
+ TCGv_i64 val, \
+ TCGv addr) \
+{ \
+ TCGv tmp = tcg_temp_new(); \
+ gen_qemu_##ldop(ctx, tmp, addr); \
+ tcg_gen_##ext##_tl_i64(val, tmp); \
+ tcg_temp_free(tmp); \
}
+GEN_QEMU_LOAD_64(ld8u, extu)
+GEN_QEMU_LOAD_64(ld16u, extu)
+GEN_QEMU_LOAD_64(ld32u, extu)
+GEN_QEMU_LOAD_64(ld32s, ext)
This is a good opportunity to clean up a bit of the ppc translator and convert to the newer tcg_gen_qemu_ld_i64 function. This will eliminate the need for the extension that you're performing here.
r~
| [Prev in Thread] | Current Thread | [Next in Thread] |