diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-16 18:31:12 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-16 18:31:12 -0800 |
commit | 6070c23e5e1c60d3bb169e43bddfa59b1d322427 (patch) | |
tree | 9a70e378c33c15e4779cf94abda8f37c35a5d1da /apps/handle.subx | |
parent | 5a6601aba973ba1d1ef30b7b64438c25623b89c5 (diff) | |
download | mu-6070c23e5e1c60d3bb169e43bddfa59b1d322427.tar.gz |
5897 - rename comparison instructions
Signed and unsigned don't quite capture the essence of what the different combinations of x86 flags are doing for SubX. The crucial distinction is that one set of comparison operators is for integers and the second is for addresses.
Diffstat (limited to 'apps/handle.subx')
-rw-r--r-- | apps/handle.subx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/handle.subx b/apps/handle.subx index 38af2db2..37fb9030 100644 --- a/apps/handle.subx +++ b/apps/handle.subx @@ -69,7 +69,7 @@ new: # ad : (addr allocation-descriptor), n : int, out : (handle _) 89/copy 1/mod/*+disp8 2/rm32/edx . . . 0/r32/eax 4/disp8 . # copy eax to *(edx+4) # if (eax == 0) out->alloc_id = 0, return 3d/compare-eax-and 0/imm32 - 75/jump-if-not-equal $new:continue/disp8 + 75/jump-if-!= $new:continue/disp8 c7 0/subop/copy 0/mod/indirect 2/rm32/edx . . . . . 0/imm32 # copy to *edx eb/jump $new:end/disp8 $new:continue: @@ -239,7 +239,7 @@ lookup: # h : (handle T) -> eax : (addr T) 8b/copy 0/mod/indirect 0/rm32/eax . . . . . . # copy *eax to eax # if (eax != handle->alloc_id) abort 39/compare 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 0/r32/eax 4/disp8 . # compare *(esp+4) and eax - 75/jump-if-not-equal $lookup:abort/disp8 + 75/jump-if-!= $lookup:abort/disp8 # eax = pop handle->address 58/pop-to-eax # discard handle->alloc_id @@ -254,7 +254,7 @@ lookup: # h : (handle T) -> eax : (addr T) #? 8b/copy 1/mod/*+disp8 0/rm32/eax . . . 0/r32/eax 4/disp8 . # copy *(eax+4) to eax #? # if (ecx != *eax) abort #? 39/compare 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # compare *eax and ecx -#? 75/jump-if-not-equal $lookup:abort/disp8 +#? 75/jump-if-!= $lookup:abort/disp8 #? # add 4 to eax #? 05/add-to-eax 4/imm32 # - } |