about summary refs log tree commit diff stats
path: root/032---operands.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-01-02 01:28:24 -0800
committerKartik Agaram <vc@akkartik.com>2020-01-02 01:28:24 -0800
commitd02aa9ac0b9e1130ffcd5a27aa1304e80eee08d9 (patch)
treebf592fba4275002cbbde420cef8c806bb9b1b45f /032---operands.cc
parent01013f2ad2132dd945c6ceb168b85dc52e18882c (diff)
downloadmu-d02aa9ac0b9e1130ffcd5a27aa1304e80eee08d9.tar.gz
5863
Just clarified for myself why `subx translate` and `subx run` need to share
code: emulation supports the tests first and foremost.

In the process we clean up our architecture for levels of layers. It's
a good idea but unused once we reconceive of "level 1" as just part of
the test harness.
Diffstat (limited to '032---operands.cc')
-rw-r--r--032---operands.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/032---operands.cc b/032---operands.cc
index 5203201e..5d434319 100644
--- a/032---operands.cc
+++ b/032---operands.cc
@@ -1,5 +1,4 @@
-//: Beginning of "level 2": tagging bytes with metadata around what field of
-//: an x86 instruction they're for.
+//: Metadata for fields of an x86 instruction.
 //:
 //: The x86 instruction set is variable-length, and how a byte is interpreted
 //: affects later instruction boundaries. A lot of the pain in programming
@@ -27,6 +26,10 @@ put_new(Help, "instructions",
 :(before "End Help Contents")
 cerr << "  instructions\n";
 
+:(before "Running Test Program")
+transform(p);
+if (trace_contains_errors()) return;
+
 :(code)
 void test_pack_immediate_constants() {
   run(