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~

Reply via email to