Revision 7b2440e4

b/target-arm/translate-a64.c
3304 3304
    }
3305 3305
}
3306 3306

  
3307
/* copy src FP register to dst FP register; type specifies single or double */
3308
static void gen_mov_fp2fp(DisasContext *s, int type, int dst, int src)
3309
{
3310
    if (type) {
3311
        TCGv_i64 v = read_fp_dreg(s, src);
3312
        write_fp_dreg(s, dst, v);
3313
        tcg_temp_free_i64(v);
3314
    } else {
3315
        TCGv_i32 v = read_fp_sreg(s, src);
3316
        write_fp_sreg(s, dst, v);
3317
        tcg_temp_free_i32(v);
3318
    }
3319
}
3320

  
3307 3321
/* C3.6.24 Floating point conditional select
3308 3322
 *   31  30  29 28       24 23  22  21 20  16 15  12 11 10 9    5 4    0
3309 3323
 * +---+---+---+-----------+------+---+------+------+-----+------+------+
......
3312 3326
 */
3313 3327
static void disas_fp_csel(DisasContext *s, uint32_t insn)
3314 3328
{
3315
    unsupported_encoding(s, insn);
3329
    unsigned int mos, type, rm, cond, rn, rd;
3330
    int label_continue = -1;
3331

  
3332
    mos = extract32(insn, 29, 3);
3333
    type = extract32(insn, 22, 2); /* 0 = single, 1 = double */
3334
    rm = extract32(insn, 16, 5);
3335
    cond = extract32(insn, 12, 4);
3336
    rn = extract32(insn, 5, 5);
3337
    rd = extract32(insn, 0, 5);
3338

  
3339
    if (mos || type > 1) {
3340
        unallocated_encoding(s);
3341
        return;
3342
    }
3343

  
3344
    if (cond < 0x0e) { /* not always */
3345
        int label_match = gen_new_label();
3346
        label_continue = gen_new_label();
3347
        arm_gen_test_cc(cond, label_match);
3348
        /* nomatch: */
3349
        gen_mov_fp2fp(s, type, rd, rm);
3350
        tcg_gen_br(label_continue);
3351
        gen_set_label(label_match);
3352
    }
3353

  
3354
    gen_mov_fp2fp(s, type, rd, rn);
3355

  
3356
    if (cond < 0x0e) { /* continue */
3357
        gen_set_label(label_continue);
3358
    }
3316 3359
}
3317 3360

  
3318 3361
/* C3.6.25 Floating point data-processing (1 source)

Also available in: Unified diff