From 0ec2787e0bbabc834fb9139b5ce070b7cd23ecf9 Mon Sep 17 00:00:00 2001 From: ry755 Date: Wed, 2 Feb 2022 04:43:23 -0800 Subject: [PATCH] fox32+fox32asm: Make ImmediatePtr encoding consistent for src and dest --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e8918a8..9c02e63 100644 --- a/src/main.rs +++ b/src/main.rs @@ -958,7 +958,7 @@ fn condition_source_destination_to_byte(node: &AstNode) -> u8 { match lhs.as_ref() { AstNode::Register(_) => 0x00, AstNode::RegisterPointer(_) => 0x04, - AstNode::ImmediatePointer(_) | AstNode::LabelOperandPointer {..} => 0x08, + AstNode::ImmediatePointer(_) | AstNode::LabelOperandPointer {..} => 0x0C, _ => panic!("Attempting to parse a non-instruction AST node as an instruction: {:#?}", node), } }