about summary refs log tree commit diff stats
path: root/subx/024pack_instructions.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-27 10:15:03 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-27 10:15:03 -0700
commit3f4bbe9e5fd1389720c7adb5577edf2dc01d51e9 (patch)
tree61d80e20e59be711010dd4a1665afedc8d9bb93a /subx/024pack_instructions.cc
parent667d21177b9d8fe3652710b818d13940b23511d7 (diff)
downloadmu-3f4bbe9e5fd1389720c7adb5577edf2dc01d51e9.tar.gz
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.
Diffstat (limited to 'subx/024pack_instructions.cc')
-rw-r--r--subx/024pack_instructions.cc2
1 files changed, 1 insertions, 1 deletions
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();