From 3f4bbe9e5fd1389720c7adb5577edf2dc01d51e9 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 27 Jul 2018 10:15:03 -0700 Subject: 4434 Key core data structures by hex bytes in text rather than opcode numbers. Saves us round trips of having to parse and reparse strings, and also allows us to more easily ignore unexpected non-hex words in each transform. We'll use this ability next when we start inserting labels. --- subx/024pack_instructions.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subx/024pack_instructions.cc') diff --git a/subx/024pack_instructions.cc b/subx/024pack_instructions.cc index a897f1da..bbaa7369 100644 --- a/subx/024pack_instructions.cc +++ b/subx/024pack_instructions.cc @@ -50,7 +50,7 @@ void pack_instructions(program& p) { segment& code = p.segments.at(0); for (int i = 0; i < SIZE(code.lines); ++i) { line& inst = code.lines.at(i); - if (all_raw_hex_bytes(inst)) continue; + if (all_hex_bytes(inst)) continue; trace(99, "translate") << "packing instruction '" << to_string(/*with metadata*/inst) << "'" << end(); pack_instruction(inst); trace(99, "translate") << "instruction after packing: '" << to_string(/*without metadata*/inst.words) << "'" << end(); -- cgit 1.4.1-2-gfad0