summary refs log tree commit diff
path: root/amd64.e
diff options
context:
space:
mode:
Diffstat (limited to 'amd64.e')
-rw-r--r--amd64.e16
1 files changed, 8 insertions, 8 deletions
diff --git a/amd64.e b/amd64.e
index 31354e2..95cdb2a 100644
--- a/amd64.e
+++ b/amd64.e
@@ -168,13 +168,13 @@ s" :cc-greater" keyword
 ~ (register -- 3-bit encoded value for register)
 : reg32
   dup :eax = { drop 0 exit } if
-  dup :ecx = { drop 0 exit } if
-  dup :edx = { drop 0 exit } if
-  dup :ebx = { drop 0 exit } if
-  dup :esp = { drop 0 exit } if
-  dup :ebp = { drop 0 exit } if
-  dup :esi = { drop 0 exit } if
-  dup :edi = { drop 0 exit } if
+  dup :ecx = { drop 1 exit } if
+  dup :edx = { drop 2 exit } if
+  dup :ebx = { drop 3 exit } if
+  dup :esp = { drop 4 exit } if
+  dup :ebp = { drop 5 exit } if
+  dup :esi = { drop 6 exit } if
+  dup :edi = { drop 7 exit } if
   ." Parameter to reg32 is not a reg32." 1 sys-exit ;
 
 ~ (register -- 3-bit encoded value for register)
@@ -213,7 +213,7 @@ s" :cc-greater" keyword
 : scalefield
   dup 1 = { drop 0 exit } if
   dup 2 = { drop 1 exit } if
-  dup 5 = { drop 2 exit } if
+  dup 4 = { drop 2 exit } if
   dup 8 = { drop 3 exit } if
   ." Parameter to scalefield is not 1, 2, 4, or 8." 1 sys-exit ;