Revision 8a56e840

b/tcg/i386/tcg-target.c
376 376
    }
377 377
}
378 378

  
379
static void tcg_out_brcond(TCGContext *s, int cond,
379
static void tcg_out_brcond(TCGContext *s, TCGCond cond,
380 380
                           TCGArg arg1, TCGArg arg2, int const_arg2,
381 381
                           int label_index, int small)
382 382
{
......
466 466
    tcg_out_label(s, label_next, (tcg_target_long)s->code_ptr);
467 467
}
468 468

  
469
static void tcg_out_setcond(TCGContext *s, int cond, TCGArg dest,
469
static void tcg_out_setcond(TCGContext *s, TCGCond cond, TCGArg dest,
470 470
                            TCGArg arg1, TCGArg arg2, int const_arg2)
471 471
{
472 472
    tcg_out_cmp(s, arg1, arg2, const_arg2);
b/tcg/mips/tcg-target.c
464 464
    }
465 465
}
466 466

  
467
static void tcg_out_brcond(TCGContext *s, int cond, int arg1,
467
static void tcg_out_brcond(TCGContext *s, TCGCond cond, int arg1,
468 468
                           int arg2, int label_index)
469 469
{
470 470
    TCGLabel *l = &s->labels[label_index];
......
522 522

  
523 523
/* XXX: we implement it at the target level to avoid having to
524 524
   handle cross basic blocks temporaries */
525
static void tcg_out_brcond2(TCGContext *s, int cond, int arg1,
525
static void tcg_out_brcond2(TCGContext *s, TCGCond cond, int arg1,
526 526
                            int arg2, int arg3, int arg4, int label_index)
527 527
{
528 528
    void *label_ptr;
......
585 585
    reloc_pc16(label_ptr, (tcg_target_long) s->code_ptr);
586 586
}
587 587

  
588
static void tcg_out_setcond(TCGContext *s, int cond, int ret,
588
static void tcg_out_setcond(TCGContext *s, TCGCond cond, int ret,
589 589
                            int arg1, int arg2)
590 590
{
591 591
    switch (cond) {
......
645 645

  
646 646
/* XXX: we implement it at the target level to avoid having to
647 647
   handle cross basic blocks temporaries */
648
static void tcg_out_setcond2(TCGContext *s, int cond, int ret,
648
static void tcg_out_setcond2(TCGContext *s, TCGCond cond, int ret,
649 649
                             int arg1, int arg2, int arg3, int arg4)
650 650
{
651 651
    switch (cond) {
b/tcg/ppc/tcg-target.c
1080 1080
static void tcg_out_cr7eq_from_cond (TCGContext *s, const TCGArg *args,
1081 1081
                                     const int *const_args)
1082 1082
{
1083
    int cond = args[4], op;
1083
    TCGCond cond = args[4];
1084
    int op;
1084 1085
    struct { int bit1; int bit2; int cond2; } bits[] = {
1085 1086
        [TCG_COND_LT ] = { CR_LT, CR_LT, TCG_COND_LT  },
1086 1087
        [TCG_COND_LE ] = { CR_LT, CR_GT, TCG_COND_LT  },
......
1120 1121
    }
1121 1122
}
1122 1123

  
1123
static void tcg_out_setcond (TCGContext *s, int cond, TCGArg arg0,
1124
static void tcg_out_setcond (TCGContext *s, TCGCond cond, TCGArg arg0,
1124 1125
                             TCGArg arg1, TCGArg arg2, int const_arg2)
1125 1126
{
1126 1127
    int crop, sh, arg;
......
1244 1245
        );
1245 1246
}
1246 1247

  
1247
static void tcg_out_brcond (TCGContext *s, int cond,
1248
static void tcg_out_brcond (TCGContext *s, TCGCond cond,
1248 1249
                            TCGArg arg1, TCGArg arg2, int const_arg2,
1249 1250
                            int label_index)
1250 1251
{
b/tcg/ppc64/tcg-target.c
1051 1051

  
1052 1052
}
1053 1053

  
1054
static void tcg_out_setcond (TCGContext *s, TCGType type, int cond, TCGArg arg0,
1055
                             TCGArg arg1, TCGArg arg2, int const_arg2)
1054
static void tcg_out_setcond (TCGContext *s, TCGType type, TCGCond cond,
1055
                             TCGArg arg0, TCGArg arg1, TCGArg arg2,
1056
                             int const_arg2)
1056 1057
{
1057 1058
    int crop, sh, arg;
1058 1059

  
......
1182 1183
    }
1183 1184
}
1184 1185

  
1185
static void tcg_out_brcond (TCGContext *s, int cond,
1186
static void tcg_out_brcond (TCGContext *s, TCGCond cond,
1186 1187
                            TCGArg arg1, TCGArg arg2, int const_arg2,
1187 1188
                            int label_index, int arch64)
1188 1189
{
b/tcg/sparc/tcg-target.c
520 520
    tcg_out_arithc(s, TCG_REG_G0, c1, c2, c2const, ARITH_SUBCC);
521 521
}
522 522

  
523
static void tcg_out_brcond_i32(TCGContext *s, int cond,
523
static void tcg_out_brcond_i32(TCGContext *s, TCGCond cond,
524 524
                               TCGArg arg1, TCGArg arg2, int const_arg2,
525 525
                               int label_index)
526 526
{
......
530 530
}
531 531

  
532 532
#if TCG_TARGET_REG_BITS == 64
533
static void tcg_out_brcond_i64(TCGContext *s, int cond,
533
static void tcg_out_brcond_i64(TCGContext *s, TCGCond cond,
534 534
                               TCGArg arg1, TCGArg arg2, int const_arg2,
535 535
                               int label_index)
536 536
{
......
539 539
    tcg_out_nop(s);
540 540
}
541 541
#else
542
static void tcg_out_brcond2_i32(TCGContext *s, int cond,
542
static void tcg_out_brcond2_i32(TCGContext *s, TCGCond cond,
543 543
                                TCGArg al, TCGArg ah,
544 544
                                TCGArg bl, int blconst,
545 545
                                TCGArg bh, int bhconst, int label_dest)
......
587 587
}
588 588
#endif
589 589

  
590
static void tcg_out_setcond_i32(TCGContext *s, int cond, TCGArg ret,
590
static void tcg_out_setcond_i32(TCGContext *s, TCGCond cond, TCGArg ret,
591 591
                                TCGArg c1, TCGArg c2, int c2const)
592 592
{
593 593
    TCGArg t;
......
643 643
}
644 644

  
645 645
#if TCG_TARGET_REG_BITS == 64
646
static void tcg_out_setcond_i64(TCGContext *s, int cond, TCGArg ret,
646
static void tcg_out_setcond_i64(TCGContext *s, TCGCond cond, TCGArg ret,
647 647
                                TCGArg c1, TCGArg c2, int c2const)
648 648
{
649 649
    tcg_out_cmp(s, c1, c2, c2const);
......
653 653
               | MOVCC_XCC | INSN_IMM11(1));
654 654
}
655 655
#else
656
static void tcg_out_setcond2_i32(TCGContext *s, int cond, TCGArg ret,
656
static void tcg_out_setcond2_i32(TCGContext *s, TCGCond cond, TCGArg ret,
657 657
                                 TCGArg al, TCGArg ah,
658 658
                                 TCGArg bl, int blconst,
659 659
                                 TCGArg bh, int bhconst)
b/tcg/tcg-op.h
593 593
    }
594 594
}
595 595

  
596
static inline void tcg_gen_brcond_i32(int cond, TCGv_i32 arg1, TCGv_i32 arg2,
597
                                      int label_index)
596
static inline void tcg_gen_brcond_i32(TCGCond cond, TCGv_i32 arg1,
597
                                      TCGv_i32 arg2, int label_index)
598 598
{
599 599
    tcg_gen_op4ii_i32(INDEX_op_brcond_i32, arg1, arg2, cond, label_index);
600 600
}
601 601

  
602
static inline void tcg_gen_brcondi_i32(int cond, TCGv_i32 arg1, int32_t arg2,
603
                                       int label_index)
602
static inline void tcg_gen_brcondi_i32(TCGCond cond, TCGv_i32 arg1,
603
                                       int32_t arg2, int label_index)
604 604
{
605 605
    TCGv_i32 t0 = tcg_const_i32(arg2);
606 606
    tcg_gen_brcond_i32(cond, arg1, t0, label_index);
607 607
    tcg_temp_free_i32(t0);
608 608
}
609 609

  
610
static inline void tcg_gen_setcond_i32(int cond, TCGv_i32 ret,
610
static inline void tcg_gen_setcond_i32(TCGCond cond, TCGv_i32 ret,
611 611
                                       TCGv_i32 arg1, TCGv_i32 arg2)
612 612
{
613 613
    tcg_gen_op4i_i32(INDEX_op_setcond_i32, ret, arg1, arg2, cond);
614 614
}
615 615

  
616
static inline void tcg_gen_setcondi_i32(int cond, TCGv_i32 ret, TCGv_i32 arg1,
617
                                        int32_t arg2)
616
static inline void tcg_gen_setcondi_i32(TCGCond cond, TCGv_i32 ret,
617
                                        TCGv_i32 arg1, int32_t arg2)
618 618
{
619 619
    TCGv_i32 t0 = tcg_const_i32(arg2);
620 620
    tcg_gen_setcond_i32(cond, ret, arg1, t0);
......
895 895
    tcg_gen_shifti_i64(ret, arg1, arg2, 1, 1);
896 896
}
897 897

  
898
static inline void tcg_gen_brcond_i64(int cond, TCGv_i64 arg1, TCGv_i64 arg2,
899
                                      int label_index)
898
static inline void tcg_gen_brcond_i64(TCGCond cond, TCGv_i64 arg1,
899
                                      TCGv_i64 arg2, int label_index)
900 900
{
901 901
    tcg_gen_op6ii_i32(INDEX_op_brcond2_i32,
902 902
                      TCGV_LOW(arg1), TCGV_HIGH(arg1), TCGV_LOW(arg2),
903 903
                      TCGV_HIGH(arg2), cond, label_index);
904 904
}
905 905

  
906
static inline void tcg_gen_setcond_i64(int cond, TCGv_i64 ret,
906
static inline void tcg_gen_setcond_i64(TCGCond cond, TCGv_i64 ret,
907 907
                                       TCGv_i64 arg1, TCGv_i64 arg2)
908 908
{
909 909
    tcg_gen_op6i_i32(INDEX_op_setcond2_i32, TCGV_LOW(ret),
......
1136 1136
    }
1137 1137
}
1138 1138

  
1139
static inline void tcg_gen_brcond_i64(int cond, TCGv_i64 arg1, TCGv_i64 arg2,
1140
                                      int label_index)
1139
static inline void tcg_gen_brcond_i64(TCGCond cond, TCGv_i64 arg1,
1140
                                      TCGv_i64 arg2, int label_index)
1141 1141
{
1142 1142
    tcg_gen_op4ii_i64(INDEX_op_brcond_i64, arg1, arg2, cond, label_index);
1143 1143
}
1144 1144

  
1145
static inline void tcg_gen_setcond_i64(int cond, TCGv_i64 ret,
1145
static inline void tcg_gen_setcond_i64(TCGCond cond, TCGv_i64 ret,
1146 1146
                                       TCGv_i64 arg1, TCGv_i64 arg2)
1147 1147
{
1148 1148
    tcg_gen_op4i_i64(INDEX_op_setcond_i64, ret, arg1, arg2, cond);
......
1263 1263
        tcg_temp_free_i64(t0);
1264 1264
    }
1265 1265
}
1266
static inline void tcg_gen_brcondi_i64(int cond, TCGv_i64 arg1, int64_t arg2,
1267
                                       int label_index)
1266
static inline void tcg_gen_brcondi_i64(TCGCond cond, TCGv_i64 arg1,
1267
                                       int64_t arg2, int label_index)
1268 1268
{
1269 1269
    TCGv_i64 t0 = tcg_const_i64(arg2);
1270 1270
    tcg_gen_brcond_i64(cond, arg1, t0, label_index);
1271 1271
    tcg_temp_free_i64(t0);
1272 1272
}
1273 1273

  
1274
static inline void tcg_gen_setcondi_i64(int cond, TCGv_i64 ret, TCGv_i64 arg1,
1275
                                        int64_t arg2)
1274
static inline void tcg_gen_setcondi_i64(TCGCond cond, TCGv_i64 ret,
1275
                                        TCGv_i64 arg1, int64_t arg2)
1276 1276
{
1277 1277
    TCGv_i64 t0 = tcg_const_i64(arg2);
1278 1278
    tcg_gen_setcond_i64(cond, ret, arg1, t0);
b/tcg/x86_64/tcg-target.c
518 518
    }
519 519
}
520 520

  
521
static void tcg_out_brcond(TCGContext *s, int cond,
521
static void tcg_out_brcond(TCGContext *s, TCGCond cond,
522 522
                           TCGArg arg1, TCGArg arg2, int const_arg2,
523 523
                           int label_index, int rexw)
524 524
{
......
526 526
    tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index);
527 527
}
528 528

  
529
static void tcg_out_setcond(TCGContext *s, int cond, TCGArg dest,
529
static void tcg_out_setcond(TCGContext *s, TCGCond cond, TCGArg dest,
530 530
                            TCGArg arg1, TCGArg arg2, int const_arg2, int rexw)
531 531
{
532 532
    tcg_out_cmp(s, arg1, arg2, const_arg2, rexw);

Also available in: Unified diff