aboutsummaryrefslogtreecommitdiff
path: root/src/armv7.rs
AgeCommit message (Collapse)Author
2026-08-02Test Target, fix bogus MRS destinationsiximeow
2026-07-28temp, armv8-thumbiximeow
2026-07-28differential testing wipiximeow
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-28probably should decide where imm-shifted reg normalization happensiximeow
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-06-19Add armv7::InstDecoder::in_thumb_mode() methodSamuel Arnold
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-22rename MCR2/MRC2 to MCR/MRCrva3
they share exactly the same encoding, except the high bits for condition the bool indicates if it's A2 encondings which is unconditional
2026-02-22derive Clone and Copy for armv7 instructionrva3
2025-10-19Opcode and Operand should be non-exhaustiveiximeow
but exhaustiveness checking is very valuable here, so allow it to be disabled. caveats apply. read the docs in Cargo.toml.
2025-10-19visitor-oriented fmtiximeow
this makes a decode+format benchmark drop from 75s to 14s... (decode is 5s)
2025-06-02some armv7 decode helpers are trivial functions but didn't inlineiximeow
both from_u8 and the build function here compiled to truly trivial code: four instructions (mov rdi, rax; cmp 0xlim, rax; jae panic; ret) in the hot path, and constrained register choice on the caller side. inlining these makes for a *smaller* armv7 decoder, on the order of 5kb down from 5.5kb. in the process it also gets about 45% faster (400mb/s to 560mb/s) inlining decode_into, then, really just helps the standalone decoder benchmark case. this moves decode throughput from 560mb/s to 724mb/s.
2024-06-25Bump yaxpeax-arch and bitvec, allow use of deprecated yaxpeax-arch traits, ↵novafacing
fix bitvec syntax changes
2023-11-02ah and a doc comment for the public method0.2.4iximeow
2023-11-02make RegShift::into_shift publicwscp
2023-01-31fix 24-bit branch immediate decodingjam1garner
2022-01-02document the crateiximeow
2021-12-29clean up warnings, several of which were real bugsiximeow
2021-09-28handle another unintended panic in display impliximeow
2021-09-28fix various armv8 and armv8 panics that should be Err.iximeow
in fact the decoder should _never_ panic. included here are tests that cover the entire 32-bit instruction space and ensure that decoding and display do not panic. these tests run uncomfortably slowly (1168s to decode the 4b "instruction" sequences on my desktop), but verify that panics are no longer an issue.
2021-09-26fix unimplemented code paths panicking as unreachableiximeow
only in a64 decoding really; there wasn't an "Incomplete" error at the time, but now there is.
2021-09-14Fix display of post-index writeback operandsJonas Schievink
2021-07-21fix DecodeError impl on builds using yaxpeax-arch+std0.1.1iximeow
2021-07-06update yaxpeax_arch and bump version to 0.1.00.1.0iximeow
2021-05-07bump yaxpeax-arch to 0.0.5 to drop the termion dep0.0.7iximeow
fix interface changes around YaxColors as well
2020-12-06support CPS (change processor state) and some warming cleanupiximeow
2020-12-06add ldc/sdc instructions and a slew of 32b thumb2 testsiximeow
2020-12-06support more mul/div variantsiximeow
2020-12-06thumb parallel addition and subtractioniximeow
2020-12-06fill out more missing thumb2 decoderiximeow
2020-12-06fix more incomplete cases, report arm instruction length properlyiximeow
2020-12-06remove "Incomplete" opcode from arm7 non-thumb decoderiximeow
2020-12-06fix regimm masksiximeow
2020-12-06numerous one-off mis-specializations, most of ld/prefetch hintsiximeow
2020-12-06fix some 32-bit thumb2 instructions, hook up .w, `s`, and a few typosiximeow
mostly confusion of pre/post-increment, operand widths, immediate widths, things of that nature
2020-12-06add thumb/thumb2 decodingiximeow
16-bit instructions only, for now
2020-11-29normalize stm/ldm to use RegWBackiximeow
2020-05-03bump to version 0.0.4, bumping yaxpeax-arch to 0.0.40.0.4iximeow
2020-03-15clean up operands someiximeow
2020-03-15armv7 support through neon, some still missing (mainly coproc instrs)iximeow
2020-02-23bring more armv7 tests back to the land of the livingiximeow
2020-02-17more strt/ldrt/strbt/ldrbt variants and operand display cleanupiximeow
2020-02-17strh/ldrh/strht/ldrht and some misc cleanupiximeow
2020-02-17entirely replace armv7 operandsiximeow
Operands was an enum covering all forms of operands and data for each operand for all instructions. this is hard to iterate, and hard to work with when a single operand is the one of interest, so it's now replaced by an array of `Operand` enum instances like other architectures. in the course of this change, several forms of decoding are broken, while adding support for some earlier-unsupported multiplies and instructions like msr and clz also clearly note which document the comments mentioning page numbers/figures is referencing