}
}
-#ifdef _AIX
static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
{
+#ifdef _AIX
int reg;
if (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)
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));
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);
}
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]) {