-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ARM decoder/encoder internal and external tests #1686
Comments
Recording some capstone bugs (beyond corner-case areas in #1685) for reference for anyone else using it as a comparison:
|
Capstone reuses LLVM code, hence you see the similar result for ARM arch. regarding bugs, please consider opening issues at https://github.com/aquynh/capstone/issues. thanks. |
Adds three new cross-platform instruction creation macros, XINST_CREATE_add_sll(), XINST_CREATE_jump_cond() and XINST_CREATE_slr_s(), for use in drcachesim. For XINST_CREATE_jump_cond(), we add aliases so that the same DR_PRED_* constants can be used for x86 as are used on aarchxx. Adds x86 tests. The infrastructure for easily adding ARM (#1686) and AArch64 (#2443) tests is still missing, unfortunately.
Updated log message: i#2465 A32 decoder: Add some missing SIMD encodings. Replace some "INVALID" lines in A32_ext_simd8 with missing encodings: OP_vbic_{i16,i32} and OP_vmov_f32. Also correct the opcodes in A32_ext_bit19. Xref #1686. Change-Id: I150ddc01484a7cbf5a866d8ab40940ebe7a9311c
Replace some "INVALID" lines in A32_ext_simd8 with missing encodings: OP_vbic_{i16,i32} and OP_vmov_f32. Also correct the opcodes in A32_ext_bit19. Xref #1686.
Adds missing required-1 bits in the ARM encoding table entries for OP_blx, OP_bx, and OP_bxj. Without the bits, some hardware still accepts the instructions (which is why we did not notice the problem before), but they are technically unsound, and QEMU thinks they are invalid, breaking some of our tests under QEMU. Tested on QEMU with the forthcoming #2414 drwrap-drreg-test, and directly with several other decoders: Prior encoding for "blx r11": <stdin>:1:1: warning: invalid instruction encoding 0x3b 0x00 0x20 0xe1 ^ llvm-mc: e120003b capstone: e120003b <INVALID: errcode 0> bfd: e120003b ; <UNDEFINED> instruction: 0xe120003b New encoding: $ disasm_a32 e12fff3b llvm-mc: e12fff3b blx r11 capstone: e12fff3b blx r11 bfd: e12fff3b blx fp Setting up more external-decoder testing is beyond the scope of this fix: #1686 covers that. Issue: #4719, #1686, #2414
Adds missing required-1 bits in the ARM encoding table entries for OP_blx, OP_bx, and OP_bxj. Without the bits, some hardware still accepts the instructions (which is why we did not notice the problem before), but they are technically unsound, and QEMU thinks they are invalid, breaking some of our tests under QEMU. Tested on QEMU with the forthcoming #2414 drwrap-drreg-test, and directly with several other decoders: Prior encoding for "blx r11": <stdin>:1:1: warning: invalid instruction encoding 0x3b 0x00 0x20 0xe1 ^ llvm-mc: e120003b capstone: e120003b <INVALID: errcode 0> bfd: e120003b ; <UNDEFINED> instruction: 0xe120003b New encoding: $ disasm_a32 e12fff3b llvm-mc: e12fff3b blx r11 capstone: e12fff3b blx r11 bfd: e12fff3b blx fp Setting up more external-decoder testing is beyond the scope of this fix: #1686 covers that. Issue: #4719, #1686, #2414
Split from #1551 which we are considering complete. We have not yet ported the internal consistency tests (e.g., api.ir) nor the external checks vs other decoders (e.g., api.dis). This issue will also serve as a container case for small bug fixes found in the course of adding these tests.
The text was updated successfully, but these errors were encountered: