diff options
author | iximeow <me@iximeow.net> | 2021-07-01 23:54:06 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-07-01 23:54:06 -0700 |
commit | a781322552d9fb52b7b5e51641f49f12678f682f (patch) | |
tree | b7ea7042d707dca8ffc322ddac4ebd5b8c475027 /test/protected_mode/display.rs | |
parent | 889ce5c55af062d12cdd109bac22cc05565f68a6 (diff) |
reallocate OperandCode, convert disparate registers to array
also remove redundant assignments of operand_count and some OperandSpec,
bulk-assign all registers and operands on entry to `read_instr`. this
all, taken together, shaves off about 7 cycles per decode.
Diffstat (limited to 'test/protected_mode/display.rs')
-rw-r--r-- | test/protected_mode/display.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/protected_mode/display.rs b/test/protected_mode/display.rs index 8426a0a..694c38c 100644 --- a/test/protected_mode/display.rs +++ b/test/protected_mode/display.rs @@ -12,7 +12,8 @@ fn test_display_under(decoder: &InstDecoder, data: &[u8], expected: &'static str for b in data { write!(hex, "{:02x}", b).unwrap(); } - match decoder.decode(data.into_iter().map(|x| *x)) { + let mut reader = yaxpeax_arch::U8Reader::new(data); + match decoder.decode(&mut reader) { Ok(instr) => { let text = format!("{}", instr.display_with(DisplayStyle::C)); assert!( |