aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2026-07-28fix several thumb2 decode bugsBrandon Ros
- 32-bit store encodings with the imm12 bit (bit 23) set were decoded as the register-offset form when imm12 < 64, or as strbt/strht/strt when imm12 was 0xExx. bit 23 set always means the imm12 form. - movw/movt packed imm4 at bit 16 instead of bit 12, producing 20-bit immediates (e.g. 0xf0005 instead of 0xf005) - mvn (immediate) was decoded as mov, dropping the bitwise not - ror (immediate) was decoded as asr all cases verified against binutils objdump
2026-07-28Do not add an 's' when outputing opcodes that always set flagsGrond
2026-07-28Decode the correct number of operands for TST/TEQ (immediate/register)Grond
2026-07-28Simplify decoding of register-shifted-register data-processing instructionsGrond
Previously, immediate-shifted-register and register-shifted-register data-processing instructions were decoded using separate decoding paths, which caused extra complexity. These two forms differ only in the interpretation of their shifting constructs, which is already handled through the `RegShift` type. This change also fixes instructions like `cmp r0, r1, lsl r2` from being decoded with an extra operand.
2026-07-28Decode the correct number of operands for CMP/CMN (immediate/register)Grond
This also incidentally fixes an issue where MOV/MVN instructions with a shifted operand could be decoded as if they had 3 operands.
2026-07-28Fix the handling of reserved bits in uncommon loads/storesGrond
There's a pattern of load/store instructions that look something like * `ldr<variant> <target registers>, [<base register>, +/- <offset register>]` * `str<variant> <target registers>, [<base register>, +/- <offset register>]` These instructions share a common encoding format, which includes the presence of 4 reserved bits starting at bit 8 in the instruction word. These bits should always be zero, according to `DDI0406C_d_armv7ar_arm.pdf`. However, while this crate did attempt to validate these bits sometimes, the validation was inverted. Instead of checking that the bits were zero, the validation would raise an error if all of the bits were zero! Additionally, some instructions were missing the check and some instructions that did not use the aforementioned encoding scheme incorrectly had the check applied to them. This commit fixes all of the issues I've found along these lines so far.
2026-07-28Check all of the appropriate bits when parsing op1 for CDP2/MCR2/MRC2Grond
2026-07-28Implement the RRX immediate shift typeGrond
2026-07-28Fix the handling of arithmetic register shifts with zero immediatesGrond
2026-02-22support A1 encoding of several coprocessor instructions + SVCrva3
initially was "implement MCR/MRC decoding", but expanded to include the whole coprocessor space for completeness, and then SVC is right there too. Neon instructions in this space are still rejected, as neon support is not really there yet. Co-authored-by: iximeow <me@iximeow.net>
2026-02-22properly display coprocessor higher than 9rva3
2025-10-19tag instruction decode fixes, differential test precisioniximeow
2025-10-19visitor-oriented fmtiximeow
this makes a decode+format benchmark drop from 75s to 14s... (decode is 5s)
2025-05-25support the rest of PAC instructions. compare to a more recent capstoneiximeow
capstone-rs currently binds an old capstone (4.0), where capstone 5.0 is where much of the armv8.2+ implementation was ported over from LLVM. so, differential testing is now pointed to a capstone-rs fork pending the merge of https://github.com/capstone-rust/capstone-rs/pull/172
2025-02-06actually check no-std configuration does not transitively depend on stdiximeow
2024-06-25Add support for `udf`Martin Fink
2024-03-17run non-panicking tests with a horkton of parallelismiximeow
they run in minute or so now and the thumb mode panics....???
2024-03-17armv8 no-panic test is now multithreadediximeow
2024-03-17fix uxtb/uxth alias being incorrectly applied with x-size registersiximeow
2024-03-17when decoding invalid opcodes, return errors. better testing for this ↵iximeow
circumstance.
2024-03-17disassembling sb is fine, tests ensure it happens nowiximeow
2024-03-17be more explicit about undefined system instructions being invalidiximeow
2024-03-17system instruction and register improvementsiximeow
* cN instead of crN for control registers * # for immediates in sys/sysl instructions * write out ARM system register names in the way the ARM reference manual says
2024-03-16ldrab and ldraa tests, fix immediate decodingiximeow
2024-03-16test dmb and make immediates shown with the immediate prefixiximeow
2024-03-16fix movi (immediate) to unpack immediate correctlyiximeow
.... and add tests that exercise movi with an immediate other than 0
2024-03-16fix ldrsw register sizeiximeow
also unignore tests that would have caught this fix test expectation that predated using pc-relative syntax and fix a test that expected an instruction to be disassembled as "invalid" successfully, rather than returning an error
2024-03-09improve msr register decodingiximeow
"improve" rather than "fix" as `pstate.0x3` is hardly as useful as `msr uao, #3`. but the "pstate field" that had been decoded before was totally incorrect.
2024-03-09fix armv8 a64 decoder hint instructionsbelovdv
2023-01-31fix 24-bit branch immediate decodingjam1garner
2022-09-29Add a test for issue #3Mitchell Johnson
2022-09-29Add some additional 32-bit thumb branch decode test casesMitchell Johnson
2022-09-29Fix 32-bit conditional thumb branchesMitchell Johnson
Correct the shift used to select condition bits and correctly compute the branch offset.
2022-09-29Fix negative unconditional 16-bit thumb branchesMitchell Johnson
Sign extension shift had an off-by-one error so the sign bit was not being properly extended.
2022-09-29Fix 32-bit Thumb unconditional branch decodingMitchell Johnson
T4 encodings of unconditional branches were not being interpreted correctly (#6), and 32-bit bl/blx instructions were similarly incorrect. Correct the bits selected for op1 and op2 and handle the slightly-unusual i1/i2 sign bit xor for these instructions.
2022-04-08add makefile to test yaxpeax-arch with and without no-stdiximeow
2022-01-02get test situation in orderiximeow