diff options
Diffstat (limited to 'src/instructions.rs')
-rw-r--r-- | src/instructions.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/instructions.rs b/src/instructions.rs index 8fa409c..59efd47 100644 --- a/src/instructions.rs +++ b/src/instructions.rs @@ -34,14 +34,10 @@ impl Instruction { let operation = OpCode::from_bytes(instruction_bytes); let operand_count = operation.get_operand_count(); - println!("Parsing {operand_count} operands for {operation:?}"); let operand_bytes = (operand_count + 1) / 2; let skip_last_half = operand_bytes != operand_count / 2; - println!("Reading {operand_bytes} bytes for operands and {}", if skip_last_half {"ignoring the last 4 bits"} else {"keeping the last 4 bits"}); let operand_bytes = (0..operand_bytes).into_iter().map(|_n| *bytes.next().unwrap().1); - println!("- check: byte array is {} long", operand_bytes.len()); let halfbytes : Vec<_> = operand_bytes.flat_map(|byte| vec![(byte, Nybble::Low), (byte, Nybble::High)]).collect(); - println!("- check: halfbyte array is {} long", halfbytes.len()); // Just ensure other borrows to the byte array have closed by rebinding it // This verifies we're at the operand data position @@ -96,7 +92,6 @@ impl OpCode { 0b11 => 4, _ => unreachable!() }; - println!("Opcode first byte: {first_byte:02x}, instruction length: {length} bytes"); return length } @@ -107,10 +102,8 @@ impl OpCode { 4 => ([bytes[0],bytes[1],bytes[2],bytes[3]], 0xC0000000), _ => panic!("Invalid opcode byte array") }; - println!("Read {} bytes: {bytes:?}", bytes.len()); let instruction = u32::from_be_bytes(padded_bytes) & !mask; - println!("Transmuting opcode 0x{instruction:03x}"); return unsafe { std::mem::transmute(instruction) } } |