fox32+fox32asm: Make ImmediatePtr encoding consistent for src and dest

This commit is contained in:
ry755 2022-02-02 04:43:23 -08:00 committed by Ry
parent d0538c59e8
commit 0ec2787e0b

View File

@ -958,7 +958,7 @@ fn condition_source_destination_to_byte(node: &AstNode) -> u8 {
match lhs.as_ref() { match lhs.as_ref() {
AstNode::Register(_) => 0x00, AstNode::Register(_) => 0x00,
AstNode::RegisterPointer(_) => 0x04, 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), _ => panic!("Attempting to parse a non-instruction AST node as an instruction: {:#?}", node),
} }
} }