about summary refs log tree commit diff stats
path: root/subx/013direct_addressing.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-05-13 00:03:40 -0700
committerKartik Agaram <vc@akkartik.com>2019-05-13 00:03:40 -0700
commit1892608f1ecb81ea328bfdc80b87cce3f3ce7113 (patch)
treeb7f7637fa7ee92baa94889a46d24b49c17eb605a /subx/013direct_addressing.cc
parent82fb58e6068f3718fe7cedd1cde1b405308bbbab (diff)
downloadmu-1892608f1ecb81ea328bfdc80b87cce3f3ce7113.tar.gz
.
Correct some confusing log messages.
Diffstat (limited to 'subx/013direct_addressing.cc')
-rw-r--r--subx/013direct_addressing.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/subx/013direct_addressing.cc b/subx/013direct_addressing.cc
index 87983e3d..b2a4bbca 100644
--- a/subx/013direct_addressing.cc
+++ b/subx/013direct_addressing.cc
@@ -770,11 +770,11 @@ void test_compare_r32_with_r32_greater() {
   run(
       "== 0x1\n"  // code segment
       // op     ModR/M  SIB   displacement  immediate
-      "  39     d8                                    \n"  // compare EBX with EAX
+      "  39     d8                                    \n"  // compare EAX with EBX
       // ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)
   );
   CHECK_TRACE_CONTENTS(
-      "run: compare EBX with r/m32\n"
+      "run: compare r/m32 with EBX\n"
       "run: r/m32 is EAX\n"
       "run: SF=0; ZF=0; CF=0; OF=0\n"
   );
@@ -784,7 +784,7 @@ void test_compare_r32_with_r32_greater() {
 case 0x39: {  // set SF if r/m32 < r32
   const uint8_t modrm = next();
   const uint8_t reg2 = (modrm>>3)&0x7;
-  trace(Callstack_depth+1, "run") << "compare " << rname(reg2) << " with r/m32" << end();
+  trace(Callstack_depth+1, "run") << "compare r/m32 with " << rname(reg2) << end();
   const int32_t* signed_arg1 = effective_address(modrm);
   const int32_t signed_arg2 = Reg[reg2].i;
   const int32_t signed_difference = *signed_arg1 - signed_arg2;
@@ -808,11 +808,11 @@ void test_compare_r32_with_r32_lesser() {
   run(
       "== 0x1\n"  // code segment
       // op     ModR/M  SIB   displacement  immediate
-      "  39     d8                                    \n"  // compare EBX with EAX
+      "  39     d8                                    \n"  // compare EAX with EBX
       // ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)
   );
   CHECK_TRACE_CONTENTS(
-      "run: compare EBX with r/m32\n"
+      "run: compare r/m32 with EBX\n"
       "run: r/m32 is EAX\n"
       "run: SF=1; ZF=0; CF=0; OF=0\n"
   );
@@ -824,11 +824,11 @@ void test_compare_r32_with_r32_lesser_unsigned() {
   run(
       "== 0x1\n"  // code segment
       // op     ModR/M  SIB   displacement  immediate
-      "  39     d8                                    \n"  // compare EBX with EAX
+      "  39     d8                                    \n"  // compare EAX with EBX
       // ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)
   );
   CHECK_TRACE_CONTENTS(
-      "run: compare EBX with r/m32\n"
+      "run: compare r/m32 with EBX\n"
       "run: r/m32 is EAX\n"
       "run: SF=1; ZF=0; CF=1; OF=0\n"
   );
@@ -840,11 +840,11 @@ void test_compare_r32_with_r32_equal() {
   run(
       "== 0x1\n"  // code segment
       // op     ModR/M  SIB   displacement  immediate
-      "  39     d8                                    \n"  // compare EBX with EAX
+      "  39     d8                                    \n"  // compare EAX and EBX
       // ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)
   );
   CHECK_TRACE_CONTENTS(
-      "run: compare EBX with r/m32\n"
+      "run: compare r/m32 with EBX\n"
       "run: r/m32 is EAX\n"
       "run: SF=0; ZF=1; CF=0; OF=0\n"
   );