diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-06-06 10:49:51 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-06-06 10:49:51 -0700 |
| commit | c0eb73f3d5820e9df3f95185a62df5853c18ce75 (patch) | |
| tree | 02dd8a85e0984e07b65609f3d3fdf9f6c24052ce | |
| parent | d695d8f0608feec9e0060241afb602e5a81e1209 (diff) | |
the encodings in reg32 were missing
this worked by coincidence since it's only ever called in one place, to encode :eax, whose encoding happens to be 0. oops. thanks to @atax1a@infosec.exchange for spotting this Force-Push: yes Change-Id: I4cddbcd370a5d0c7db2f8733431bfda388022a22
| -rw-r--r-- | amd64.e | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/amd64.e b/amd64.e index 31354e2..796e646 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) |