wargio / libvle

PowerPC VLE disassembler library
GNU Lesser General Public License v3.0
5 stars 5 forks source link

bugs, tests #1

Closed bfarago closed 6 years ago

bfarago commented 6 years ago

Hi, I am developing yet another PPC disasm several month ago. Right now I compare codes of different authors (like qemu_ppc, etc). I reviewed and tried out your code already. Please see my findings, and accept the pull request. The first one is tst1 for test the actual code, the second one is fix1, which contains the fixes.

Findigs (E:error, C:cosmetic): E: vlenext() can return one more se* after end pos. (there's no range check) C: vle_next() pos incremented after range check, multiple checks occures. Can be a better order of those. E: some op filter masks are wrong (testcases will be inculded soon) E: some ops are missing C: compiler can make sign extension some cases, U suffix for constants may be a good idea. C: header file isn't c++ compatible, use ifdef __cplusplus and extern "C" kind of thing... E: some operand fields are handled wrong. (i.e. using of spr nr and extended register nr.) So, even if the op filter fixed or new rule added, the reported operands will be wrong. E: one of the break is missing from a switch/case. C: E_NONE is used instead of F_NONE around switch default cases.

Thanks, B.