Revision d9370327 tcg/ppc/tcg-target.c

b/tcg/ppc/tcg-target.c
472 472
    }
473 473
}
474 474

  
475
#ifdef _AIX
476 475
static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
477 476
{
477
#ifdef _AIX
478 478
    int reg;
479 479

  
480 480
    if (const_arg) {
......
487 487
    tcg_out32 (s, MTSPR | RA (0) | CTR);
488 488
    tcg_out32 (s, LWZ | RT (2) | RA (reg) | 4);
489 489
    tcg_out32 (s, BCCTR | BO_ALWAYS | LK);
490
}
490
#else
491
    if (const_arg) {
492
        tcg_out_b (s, LK, arg);
493
    }
494
    else {
495
        tcg_out32 (s, MTSPR | RS (arg) | LR);
496
        tcg_out32 (s, BCLR | BO_ALWAYS | LK);
497
    }
491 498
#endif
499
}
492 500

  
493 501
#if defined(CONFIG_SOFTMMU)
494 502

  
......
584 592
    tcg_out_movi (s, TCG_TYPE_I32, 5, mem_index);
585 593
#endif
586 594

  
587
#ifdef _AIX
588 595
    tcg_out_call (s, (tcg_target_long) qemu_ld_helpers[s_bits], 1);
589
#else
590
    tcg_out_b (s, LK, (tcg_target_long) qemu_ld_helpers[s_bits]);
591
#endif
592 596
    switch (opc) {
593 597
    case 0|4:
594 598
        tcg_out32 (s, EXTSB | RA (data_reg) | RS (3));
......
819 823
    ir++;
820 824

  
821 825
    tcg_out_movi (s, TCG_TYPE_I32, ir, mem_index);
822
#ifdef _AIX
823 826
    tcg_out_call (s, (tcg_target_long) qemu_st_helpers[opc], 1);
824
#else
825
    tcg_out_b (s, LK, (tcg_target_long) qemu_st_helpers[opc]);
826
#endif
827 827
    label2_ptr = s->code_ptr;
828 828
    tcg_out32 (s, B);
829 829

  
......
1188 1188
        }
1189 1189
        break;
1190 1190
    case INDEX_op_call:
1191
#ifdef _AIX
1192 1191
        tcg_out_call (s, args[0], const_args[0]);
1193
#else
1194
        if (const_args[0]) {
1195
            tcg_out_b (s, LK, args[0]);
1196
        }
1197
        else {
1198
            tcg_out32 (s, MTSPR | RS (args[0]) | LR);
1199
            tcg_out32 (s, BCLR | BO_ALWAYS | LK);
1200
        }
1201
#endif
1202 1192
        break;
1203 1193
    case INDEX_op_jmp:
1204 1194
        if (const_args[0]) {

Also available in: Unified diff