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 /083subx-widths.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 '083subx-widths.subx')
-rw-r--r-- | 083subx-widths.subx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/083subx-widths.subx b/083subx-widths.subx index ffefe194..d384ea91 100644 --- a/083subx-widths.subx +++ b/083subx-widths.subx @@ -62,7 +62,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int # . if (eax != false) return 4 3d/compare-eax-and 0/imm32/false b8/copy-to-eax 4/imm32 # ZF is set, so we can overwrite eax now - 75/jump-if-not-equal $compute-width-of-slice:end/disp8 + 75/jump-if-!= $compute-width-of-slice:end/disp8 # if (has-metadata?(word, "disp32")) return 4 # . eax = has-metadata?(word, "disp32") # . . push args @@ -75,7 +75,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int # . if (eax != false) return 4 3d/compare-eax-and 0/imm32/false b8/copy-to-eax 4/imm32 # ZF is set, so we can overwrite eax now - 75/jump-if-not-equal $compute-width-of-slice:end/disp8 + 75/jump-if-!= $compute-width-of-slice:end/disp8 # if (has-metadata?(word, "imm16")) return 2 # . eax = has-metadata?(word, "imm16") # . . push args @@ -88,7 +88,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int # . if (eax != false) return 2 3d/compare-eax-and 0/imm32/false b8/copy-to-eax 2/imm32 # ZF is set, so we can overwrite eax now - 75/jump-if-not-equal $compute-width-of-slice:end/disp8 + 75/jump-if-!= $compute-width-of-slice:end/disp8 # if (has-metadata?(word, "disp16")) return 2 # . eax = has-metadata?(word, "disp16") # . . push args @@ -101,7 +101,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int # . if (eax != false) return 2 3d/compare-eax-and 0/imm32/false b8/copy-to-eax 2/imm32 # ZF is set, so we can overwrite eax now - 75/jump-if-not-equal $compute-width-of-slice:end/disp8 + 75/jump-if-!= $compute-width-of-slice:end/disp8 # otherwise return 1 b8/copy-to-eax 1/imm32 $compute-width-of-slice:end: |