tcg/tci: Implement andc, orc, eqv, nand, nor
These were already present in tcg-target.c.inc, but not in the interpreter. Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
df093c19ef
commit
a81520b92d
40
tcg/tci.c
40
tcg/tci.c
@ -531,6 +531,36 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env,
|
||||
tci_args_rrr(insn, &r0, &r1, &r2);
|
||||
regs[r0] = regs[r1] ^ regs[r2];
|
||||
break;
|
||||
#if TCG_TARGET_HAS_andc_i32 || TCG_TARGET_HAS_andc_i64
|
||||
CASE_32_64(andc)
|
||||
tci_args_rrr(insn, &r0, &r1, &r2);
|
||||
regs[r0] = regs[r1] & ~regs[r2];
|
||||
break;
|
||||
#endif
|
||||
#if TCG_TARGET_HAS_orc_i32 || TCG_TARGET_HAS_orc_i64
|
||||
CASE_32_64(orc)
|
||||
tci_args_rrr(insn, &r0, &r1, &r2);
|
||||
regs[r0] = regs[r1] | ~regs[r2];
|
||||
break;
|
||||
#endif
|
||||
#if TCG_TARGET_HAS_eqv_i32 || TCG_TARGET_HAS_eqv_i64
|
||||
CASE_32_64(eqv)
|
||||
tci_args_rrr(insn, &r0, &r1, &r2);
|
||||
regs[r0] = ~(regs[r1] ^ regs[r2]);
|
||||
break;
|
||||
#endif
|
||||
#if TCG_TARGET_HAS_nand_i32 || TCG_TARGET_HAS_nand_i64
|
||||
CASE_32_64(nand)
|
||||
tci_args_rrr(insn, &r0, &r1, &r2);
|
||||
regs[r0] = ~(regs[r1] & regs[r2]);
|
||||
break;
|
||||
#endif
|
||||
#if TCG_TARGET_HAS_nor_i32 || TCG_TARGET_HAS_nor_i64
|
||||
CASE_32_64(nor)
|
||||
tci_args_rrr(insn, &r0, &r1, &r2);
|
||||
regs[r0] = ~(regs[r1] | regs[r2]);
|
||||
break;
|
||||
#endif
|
||||
|
||||
/* Arithmetic operations (32 bit). */
|
||||
|
||||
@ -1121,6 +1151,16 @@ int print_insn_tci(bfd_vma addr, disassemble_info *info)
|
||||
case INDEX_op_or_i64:
|
||||
case INDEX_op_xor_i32:
|
||||
case INDEX_op_xor_i64:
|
||||
case INDEX_op_andc_i32:
|
||||
case INDEX_op_andc_i64:
|
||||
case INDEX_op_orc_i32:
|
||||
case INDEX_op_orc_i64:
|
||||
case INDEX_op_eqv_i32:
|
||||
case INDEX_op_eqv_i64:
|
||||
case INDEX_op_nand_i32:
|
||||
case INDEX_op_nand_i64:
|
||||
case INDEX_op_nor_i32:
|
||||
case INDEX_op_nor_i64:
|
||||
case INDEX_op_div_i32:
|
||||
case INDEX_op_div_i64:
|
||||
case INDEX_op_rem_i32:
|
||||
|
@ -68,20 +68,20 @@
|
||||
#define TCG_TARGET_HAS_ext16s_i32 1
|
||||
#define TCG_TARGET_HAS_ext8u_i32 1
|
||||
#define TCG_TARGET_HAS_ext16u_i32 1
|
||||
#define TCG_TARGET_HAS_andc_i32 0
|
||||
#define TCG_TARGET_HAS_andc_i32 1
|
||||
#define TCG_TARGET_HAS_deposit_i32 1
|
||||
#define TCG_TARGET_HAS_extract_i32 0
|
||||
#define TCG_TARGET_HAS_sextract_i32 0
|
||||
#define TCG_TARGET_HAS_extract2_i32 0
|
||||
#define TCG_TARGET_HAS_eqv_i32 0
|
||||
#define TCG_TARGET_HAS_nand_i32 0
|
||||
#define TCG_TARGET_HAS_nor_i32 0
|
||||
#define TCG_TARGET_HAS_eqv_i32 1
|
||||
#define TCG_TARGET_HAS_nand_i32 1
|
||||
#define TCG_TARGET_HAS_nor_i32 1
|
||||
#define TCG_TARGET_HAS_clz_i32 0
|
||||
#define TCG_TARGET_HAS_ctz_i32 0
|
||||
#define TCG_TARGET_HAS_ctpop_i32 0
|
||||
#define TCG_TARGET_HAS_neg_i32 1
|
||||
#define TCG_TARGET_HAS_not_i32 1
|
||||
#define TCG_TARGET_HAS_orc_i32 0
|
||||
#define TCG_TARGET_HAS_orc_i32 1
|
||||
#define TCG_TARGET_HAS_rot_i32 1
|
||||
#define TCG_TARGET_HAS_movcond_i32 1
|
||||
#define TCG_TARGET_HAS_muls2_i32 0
|
||||
@ -109,16 +109,16 @@
|
||||
#define TCG_TARGET_HAS_ext8u_i64 1
|
||||
#define TCG_TARGET_HAS_ext16u_i64 1
|
||||
#define TCG_TARGET_HAS_ext32u_i64 1
|
||||
#define TCG_TARGET_HAS_andc_i64 0
|
||||
#define TCG_TARGET_HAS_eqv_i64 0
|
||||
#define TCG_TARGET_HAS_nand_i64 0
|
||||
#define TCG_TARGET_HAS_nor_i64 0
|
||||
#define TCG_TARGET_HAS_andc_i64 1
|
||||
#define TCG_TARGET_HAS_eqv_i64 1
|
||||
#define TCG_TARGET_HAS_nand_i64 1
|
||||
#define TCG_TARGET_HAS_nor_i64 1
|
||||
#define TCG_TARGET_HAS_clz_i64 0
|
||||
#define TCG_TARGET_HAS_ctz_i64 0
|
||||
#define TCG_TARGET_HAS_ctpop_i64 0
|
||||
#define TCG_TARGET_HAS_neg_i64 1
|
||||
#define TCG_TARGET_HAS_not_i64 1
|
||||
#define TCG_TARGET_HAS_orc_i64 0
|
||||
#define TCG_TARGET_HAS_orc_i64 1
|
||||
#define TCG_TARGET_HAS_rot_i64 1
|
||||
#define TCG_TARGET_HAS_movcond_i64 1
|
||||
#define TCG_TARGET_HAS_muls2_i64 0
|
||||
|
Loading…
Reference in New Issue
Block a user