From 6070c23e5e1c60d3bb169e43bddfa59b1d322427 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 16 Jan 2020 18:31:12 -0800 Subject: 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. --- 083subx-widths.subx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '083subx-widths.subx') 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: -- cgit 1.4.1-2-gfad0