about summary refs log tree commit diff stats
path: root/subx/022div.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-27 16:01:55 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-27 17:47:59 -0700
commit6e1eeeebfb453fa7c871869c19375ce60fbd7413 (patch)
tree539c4a3fdf1756ae79770d5c4aaf6366f1d1525e /subx/022div.cc
parent8846a7f85cc04b77b2fe8a67b6d317723437b00c (diff)
downloadmu-6e1eeeebfb453fa7c871869c19375ce60fbd7413.tar.gz
5485 - promote SubX to top-level
Diffstat (limited to 'subx/022div.cc')
-rw-r--r--subx/022div.cc38
1 files changed, 0 insertions, 38 deletions
diff --git a/subx/022div.cc b/subx/022div.cc
deleted file mode 100644
index 15ed89d8..00000000
--- a/subx/022div.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-//: helper for division operations: sign-extend EAX into EDX
-
-:(before "End Initialize Op Names")
-put_new(Name, "99", "sign-extend EAX into EDX (cdq)");
-
-:(code)
-void test_cdq() {
-  Reg[EAX].i = 10;
-  run(
-      "== code 0x1\n"
-      "99\n"
-  );
-  CHECK_TRACE_CONTENTS(
-      "run: sign-extend EAX into EDX\n"
-      "run: EDX is now 0x00000000\n"
-  );
-}
-
-:(before "End Single-Byte Opcodes")
-case 0x99: {  // sign-extend EAX into EDX
-  trace(Callstack_depth+1, "run") << "sign-extend EAX into EDX" << end();
-  Reg[EDX].i = (Reg[EAX].i < 0) ? -1 : 0;
-  trace(Callstack_depth+1, "run") << "EDX is now 0x" << HEXWORD << Reg[EDX].u << end();
-  break;
-}
-
-:(code)
-void test_cdq_negative() {
-  Reg[EAX].i = -10;
-  run(
-      "== code 0x1\n"
-      "99\n"
-  );
-  CHECK_TRACE_CONTENTS(
-      "run: sign-extend EAX into EDX\n"
-      "run: EDX is now 0xffffffff\n"
-  );
-}