summaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-09-27 14:39:48 +0400
committermalc <av1474@comtv.ru>2009-09-27 14:41:14 +0400
commitd9370327648b553b96f60ecc987b2056aeeee3e5 (patch)
treee84bf2256c77b92d75b6153fcf1eecb48fffda28 /tcg
parentvl: Add failure check for SetEvent (diff)
downloadqemu-kvm-d9370327648b553b96f60ecc987b2056aeeee3e5.tar.gz
qemu-kvm-d9370327648b553b96f60ecc987b2056aeeee3e5.tar.bz2
qemu-kvm-d9370327648b553b96f60ecc987b2056aeeee3e5.zip
tcg/ppc: always use tcg_out_call
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/ppc/tcg-target.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index 07395153e..07e6941fe 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -472,9 +472,9 @@ static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target)
}
}
-#ifdef _AIX
static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
{
+#ifdef _AIX
int reg;
if (const_arg) {
@@ -487,8 +487,16 @@ static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
tcg_out32 (s, MTSPR | RA (0) | CTR);
tcg_out32 (s, LWZ | RT (2) | RA (reg) | 4);
tcg_out32 (s, BCCTR | BO_ALWAYS | LK);
-}
+#else
+ if (const_arg) {
+ tcg_out_b (s, LK, arg);
+ }
+ else {
+ tcg_out32 (s, MTSPR | RS (arg) | LR);
+ tcg_out32 (s, BCLR | BO_ALWAYS | LK);
+ }
#endif
+}
#if defined(CONFIG_SOFTMMU)
@@ -584,11 +592,7 @@ static void tcg_out_qemu_ld (TCGContext *s, const TCGArg *args, int opc)
tcg_out_movi (s, TCG_TYPE_I32, 5, mem_index);
#endif
-#ifdef _AIX
tcg_out_call (s, (tcg_target_long) qemu_ld_helpers[s_bits], 1);
-#else
- tcg_out_b (s, LK, (tcg_target_long) qemu_ld_helpers[s_bits]);
-#endif
switch (opc) {
case 0|4:
tcg_out32 (s, EXTSB | RA (data_reg) | RS (3));
@@ -819,11 +823,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc)
ir++;
tcg_out_movi (s, TCG_TYPE_I32, ir, mem_index);
-#ifdef _AIX
tcg_out_call (s, (tcg_target_long) qemu_st_helpers[opc], 1);
-#else
- tcg_out_b (s, LK, (tcg_target_long) qemu_st_helpers[opc]);
-#endif
label2_ptr = s->code_ptr;
tcg_out32 (s, B);
@@ -1188,17 +1188,7 @@ static void tcg_out_op(TCGContext *s, int opc, const TCGArg *args,
}
break;
case INDEX_op_call:
-#ifdef _AIX
tcg_out_call (s, args[0], const_args[0]);
-#else
- if (const_args[0]) {
- tcg_out_b (s, LK, args[0]);
- }
- else {
- tcg_out32 (s, MTSPR | RS (args[0]) | LR);
- tcg_out32 (s, BCLR | BO_ALWAYS | LK);
- }
-#endif
break;
case INDEX_op_jmp:
if (const_args[0]) {