TMS32c64x gives different assembly text if details are enabled
Work environment
| Questions | Answers |
|---|---|
| System Capstone runs on OS/arch/bits | All |
| Capstone module affected | tms32oc64x |
| Source of Capstone | git clone |
| Version/git commit | v5, v6 |
Instruction bytes giving faulty results
0x02,0x7f,0xff,0xa9 (big endian)
Expected results
It should be either:
mvk.S1 -1, a4 ||
or
mvk -1, a4
But it must be consistent.
Steps to get the wrong result
With cstool:
cstool tms320c64x -d 0x02,0x7f,0xff,0xa9
cstool tms320c64x 0x02,0x7f,0xff,0xa9
Additional Logs, screenshots, source code, configuration dump, ...
The TMS320C64x_post_printer() changes the assembly text if the details are enabled. Which doesn't make sense, because it should also fix up the text if it isn't enabled.
cc @trufae To quote:
you can read more about this in the TI doc https://www.ti.com/lit/ug/spru732j/spru732j.pdf
what re those details /without details disasm difference? i mean, the || means the instruction will be executed in parallel with the previous or following instruction.
The p-bit (bit 0) determines whether the instruction executes in parallel with another instruction.So what ever it does now is not correct. Will look at it after the Alpha4 patch release, since it takes a little more effort to be don properly.
Thanks for the effort! I plan to meanwhile integrate the gnu disassembler so it can be used to compare.