rust-x86asm icon indicating copy to clipboard operation
rust-x86asm copied to clipboard

A Rust library for x86/64 assembly/disassembly.

Results 10 rust-x86asm issues
Sort by recently updated
recently updated
newest added

This PR converts various panics in `read_operand` into runtime errors that can be more gracefully handled. It also addresses a few warnings when building with Rust nightly (1.45.0). Verified tests...

```rust fn main() { println!("{:?}", x86asm::InstructionReader::new( &[0x6c, 0x90][..], x86asm::Mode::Protected, ).read()); } ``` ``` thread 'main' panicked at 'Invalid operand definition.', C:\Users\diago\.cargo\registry\src\github.com-1ecc6299db9ec823\x86asm-0.1.0\src\decoding.rs:322:26 ``` It's not entirely clear to me why this...

Seeing how this repo hasn't been updated in two years, this is probably not going anywhere soon, but I tried running the ever-present DOS stub that is present in every...

REX registers were previously not allowed in memory addressing operands (i.e., Operand::Indirect*). To be honest, I'm not too experienced in x86 opcode encoding and I'm not to sure if this...

This fixes encoding of 'POP R8', 'PUSH R15', etc. Previously, no "rex byte" was generated when using REX registers with instructions that use `opcode_add` and the register code (>= 0x8)...

This fails: ```rust 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...

Eg, ```rust use std::io::*; use x86asm::*; let buffer = Cursor::new(Vec::new()); let mut writer = InstructionWriter::new(buffer, Mode::Long); writer.write2(Mnemonic::MOV, Operand::Direct(Reg::RBX), Operand::Direct(Reg::RAX))?; ``` causes an `unimplemented` panic.

The following fails in x86asm 0.1.0: ```rust let buffer = Cursor::new([0x66, 0x40, 0x0f, 0x2e, 0xc0]); let mut reader = InstructionReader::new(buffer, Mode::Long); match reader.read() { Ok(_) => (), Err(e) => panic!("{:?}",...