mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target/tricore: Add crc32l.w insn
reported in https://gitlab.com/qemu-project/qemu/-/issues/1667 Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-Id: <20230614100039.1337971-5-kbastian@mail.uni-paderborn.de>
This commit is contained in:
parent
73f874d9fe
commit
dc0b4368be
4 changed files with 23 additions and 5 deletions
|
@ -6190,13 +6190,21 @@ static void decode_rr_divide(DisasContext *ctx)
|
|||
CHECK_REG_PAIR(r3);
|
||||
gen_unpack(cpu_gpr_d[r3], cpu_gpr_d[r3+1], cpu_gpr_d[r1]);
|
||||
break;
|
||||
case OPC2_32_RR_CRC32:
|
||||
case OPC2_32_RR_CRC32: /* CRC32B.W in 1.6.2 */
|
||||
if (has_feature(ctx, TRICORE_FEATURE_161)) {
|
||||
gen_helper_crc32(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2]);
|
||||
gen_helper_crc32_be(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2]);
|
||||
} else {
|
||||
generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC);
|
||||
}
|
||||
break;
|
||||
case OPC2_32_RR_CRC32L_W:
|
||||
if (has_feature(ctx, TRICORE_FEATURE_162)) {
|
||||
gen_helper_crc32_le(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2]);
|
||||
} else {
|
||||
generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC);
|
||||
}
|
||||
break;
|
||||
|
||||
case OPC2_32_RR_POPCNT_W:
|
||||
if (has_feature(ctx, TRICORE_FEATURE_162)) {
|
||||
tcg_gen_ctpop_tl(cpu_gpr_d[r3], cpu_gpr_d[r1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue