diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-27 10:15:03 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-27 10:15:03 -0700 |
commit | 3f4bbe9e5fd1389720c7adb5577edf2dc01d51e9 (patch) | |
tree | 61d80e20e59be711010dd4a1665afedc8d9bb93a /subx/024pack_instructions.cc | |
parent | 667d21177b9d8fe3652710b818d13940b23511d7 (diff) | |
download | mu-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.cc | 2 |
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(); |