Skip to content

Commit

Permalink
Fix wrong version requirement of tricore instructions: (#2620)
Browse files Browse the repository at this point in the history
crc32.b
crc32b.w
crc32l.w
crcn
popcnt.w
shuffle

Remove invalid instruction:
BISR_rc_v161

Learn up misconfigure of nor and not
  • Loading branch information
Changqing-JING authored Feb 19, 2025
1 parent 8ac2843 commit 4e0b8c4
Show file tree
Hide file tree
Showing 13 changed files with 13,886 additions and 6,430 deletions.
22 changes: 0 additions & 22 deletions arch/TriCore/TriCoreDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1711,28 +1711,6 @@ static bool getInstruction(csh ud, const uint8_t *code, size_t code_len,
}
break;
}
case CS_MODE_TRICORE_161: {
if (decodeInstruction2_or_4(code, code_len, MI, size, address,
NULL, DecoderTablev16132)) {
return true;
}
break;
}
case CS_MODE_TRICORE_162: {
if (decodeInstruction2_or_4(code, code_len, MI, size, address,
DecoderTablev16216,
DecoderTablev16232)) {
return true;
}
break;
}
case CS_MODE_TRICORE_180: {
if (decodeInstruction2_or_4(code, code_len, MI, size, address,
NULL, DecoderTablev16232)) {
return true;
}
break;
}
default:
break;
}
Expand Down
12 changes: 3 additions & 9 deletions arch/TriCore/TriCoreGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ static MnemonicBitsInfo getMnemonic(MCInst *MI, SStream *O) {
33559039U, // AND_srr
33559039U, // AND_srr_v110
9868U, // BISR_rc
9868U, // BISR_rc_v161
13964U, // BISR_sc
13964U, // BISR_sc_v110
4640U, // BMERGAE_rr_v110
Expand Down Expand Up @@ -1495,9 +1494,7 @@ static MnemonicBitsInfo getMnemonic(MCInst *MI, SStream *O) {
5985U, // NOR_T
536876674U, // NOR_rc
5762U, // NOR_rr
333442U, // NOR_sr
333442U, // NOR_sr_v110
333793U, // NOT_sr_v162
333793U, // NOT_sr
5938U, // ORN_T
536876460U, // ORN_rc
5548U, // ORN_rr
Expand Down Expand Up @@ -2122,7 +2119,6 @@ static MnemonicBitsInfo getMnemonic(MCInst *MI, SStream *O) {
0U, // AND_srr
0U, // AND_srr_v110
0U, // BISR_rc
0U, // BISR_rc_v161
0U, // BISR_sc
0U, // BISR_sc_v110
0U, // BMERGAE_rr_v110
Expand Down Expand Up @@ -2829,9 +2825,7 @@ static MnemonicBitsInfo getMnemonic(MCInst *MI, SStream *O) {
1U, // NOR_T
0U, // NOR_rc
0U, // NOR_rr
0U, // NOR_sr
0U, // NOR_sr_v110
0U, // NOT_sr_v162
0U, // NOT_sr
1U, // ORN_T
0U, // ORN_rc
0U, // ORN_rr
Expand Down Expand Up @@ -3142,7 +3136,7 @@ static void printInstruction(MCInst *MI, uint64_t Address, SStream *O) {
printOperand(MI, 0, O);
break;
case 2:
// BISR_rc, BISR_rc_v161, SYSCALL_rc
// BISR_rc, SYSCALL_rc
printSExtImm_9(MI, 0, O);
return;
break;
Expand Down
Loading

0 comments on commit 4e0b8c4

Please sign in to comment.