We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This fails:
extern crate x86asm; fn main() { use x86asm::*; use std::io::{Cursor, Write}; let mut out = Vec::new(); let i = Instruction::new2(Mnemonic::MOV, Operand::Memory(0xB0_B1_B2_B3_B4_B5, Some(OperandSize::Qword), None), Operand::Direct(Reg::RAX)); { let mut asm = InstructionWriter::new(&mut out, Mode::Long); asm.write(&i).unwrap(); } for x in &out { print!("{:02X} ", x); } println!(); println!("Expect:"); println!("{:#?}", i); { use x86asm::*; let mut asm = InstructionReader::new(Cursor::new(&out), Mode::Long); let got = asm.read().unwrap(); println!("Actual:"); println!("{:#?}", got); assert_eq!(i, got); assert_eq!(asm.read(), Err(InstructionDecodingError::EndOfStream)); } }
Output:
48 89 04 05 B5 B4 B3 B2 Instruction { mnemonic: MOV, operand1: Some( Memory( 194277253821621, Some( Qword ), None ) ), operand2: Some( Direct( RAX ) ), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None } Actual: Instruction { mnemonic: MOV, operand1: Some( IndirectScaledDisplaced( RAX, One, 2998121653, Some( Qword ), None ) ), operand2: Some( Direct( RAX ) ), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }
(Well, using my fork https://github.com/purpleposeidon/rust-x86asm, ahem.)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This fails:
Output:
(Well, using my fork https://github.com/purpleposeidon/rust-x86asm, ahem.)
The text was updated successfully, but these errors were encountered: