Revision ec188429 tcg/hppa/tcg-target.c
b/tcg/hppa/tcg-target.c | ||
---|---|---|
467 | 467 |
| INSN_SHDEP_CP(31 - ofs) | INSN_DEP_LEN(len)); |
468 | 468 |
} |
469 | 469 |
|
470 |
static inline void tcg_out_depi(TCGContext *s, int ret, int arg, |
|
471 |
unsigned ofs, unsigned len) |
|
472 |
{ |
|
473 |
assert(ofs < 32 && len <= 32 - ofs); |
|
474 |
tcg_out32(s, INSN_DEPI | INSN_R2(ret) | INSN_IM5(arg) |
|
475 |
| INSN_SHDEP_CP(31 - ofs) | INSN_DEP_LEN(len)); |
|
476 |
} |
|
477 |
|
|
470 | 478 |
static inline void tcg_out_shd(TCGContext *s, int ret, int hi, int lo, |
471 | 479 |
unsigned count) |
472 | 480 |
{ |
... | ... | |
499 | 507 |
assert(bs1 == 32 || (1ul << bs1) > m); |
500 | 508 |
|
501 | 509 |
tcg_out_mov(s, TCG_TYPE_I32, ret, arg); |
502 |
tcg_out32(s, INSN_DEPI | INSN_R2(ret) | INSN_IM5(-1) |
|
503 |
| INSN_SHDEP_CP(31 - bs0) | INSN_DEP_LEN(bs1 - bs0)); |
|
510 |
tcg_out_depi(s, ret, -1, bs0, bs1 - bs0); |
|
504 | 511 |
} |
505 | 512 |
|
506 | 513 |
static void tcg_out_andi(TCGContext *s, int ret, int arg, tcg_target_ulong m) |
... | ... | |
529 | 536 |
tcg_out_extr(s, ret, arg, 0, ls0, 0); |
530 | 537 |
} else { |
531 | 538 |
tcg_out_mov(s, TCG_TYPE_I32, ret, arg); |
532 |
tcg_out32(s, INSN_DEPI | INSN_R2(ret) | INSN_IM5(0) |
|
533 |
| INSN_SHDEP_CP(31 - ls0) | INSN_DEP_LEN(ls1 - ls0)); |
|
539 |
tcg_out_depi(s, ret, 0, ls0, ls1 - ls0); |
|
534 | 540 |
} |
535 | 541 |
} |
536 | 542 |
|
... | ... | |
1459 | 1465 |
args[4], args[5], const_args[2], const_args[4]); |
1460 | 1466 |
break; |
1461 | 1467 |
|
1468 |
case INDEX_op_deposit_i32: |
|
1469 |
if (const_args[2]) { |
|
1470 |
tcg_out_depi(s, args[0], args[2], args[3], args[4]); |
|
1471 |
} else { |
|
1472 |
tcg_out_dep(s, args[0], args[2], args[3], args[4]); |
|
1473 |
} |
|
1474 |
break; |
|
1475 |
|
|
1462 | 1476 |
case INDEX_op_qemu_ld8u: |
1463 | 1477 |
tcg_out_qemu_ld(s, args, 0); |
1464 | 1478 |
break; |
... | ... | |
1552 | 1566 |
{ INDEX_op_add2_i32, { "r", "r", "rZ", "rZ", "rI", "rZ" } }, |
1553 | 1567 |
{ INDEX_op_sub2_i32, { "r", "r", "rI", "rZ", "rK", "rZ" } }, |
1554 | 1568 |
|
1569 |
{ INDEX_op_deposit_i32, { "r", "0", "rJ" } }, |
|
1570 |
|
|
1555 | 1571 |
#if TARGET_LONG_BITS == 32 |
1556 | 1572 |
{ INDEX_op_qemu_ld8u, { "r", "L" } }, |
1557 | 1573 |
{ INDEX_op_qemu_ld8s, { "r", "L" } }, |
Also available in: Unified diff