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. --- html/apps/crenshaw2-1b.subx.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'html/apps/crenshaw2-1b.subx.html') diff --git a/html/apps/crenshaw2-1b.subx.html b/html/apps/crenshaw2-1b.subx.html index 4327640b..ae74e982 100644 --- a/html/apps/crenshaw2-1b.subx.html +++ b/html/apps/crenshaw2-1b.subx.html @@ -108,7 +108,7 @@ if ('onhashchange' in window) { 47 # - if argc > 1 and argv[1] == "test", then return run_tests() 48 # if (argc <= 1) goto run-main 49 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp - 50 7e/jump-if-lesser-or-equal $run-main/disp8 + 50 7e/jump-if-<= $run-main/disp8 51 # if (!kernel-string-equal?(argv[1], "test")) goto run-main 52 # . eax = kernel-string-equal?(argv[1], "test") 53 # . . push args @@ -120,7 +120,7 @@ if ('onhashchange' in window) { 59 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 60 # . if (eax == false) goto run-main 61 3d/compare-eax-and 0/imm32/false - 62 74/jump-if-equal $run-main/disp8 + 62 74/jump-if-= $run-main/disp8 63 # run-tests() 64 e8/call run-tests/disp32 65 # syscall(exit, *Num-test-failures) @@ -290,7 +290,7 @@ if ('onhashchange' in window) { 229 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 230 # . if (eax == false) 231 3d/compare-eax-and 0/imm32/false -232 75/jump-if-not-equal $get-num:main/disp8 +232 75/jump-if-!= $get-num:main/disp8 233 # . expected(ed, err, "integer") 234 # . . push args 235 68/push "integer"/imm32 @@ -321,7 +321,7 @@ if ('onhashchange' in window) { 260 $get-num:loop: 261 # if (out->write >= out->length) error 262 39/compare 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # compare edx with ecx -263 7d/jump-if-lesser $get-num:loop-stage2/disp8 +263 7d/jump-if-< $get-num:loop-stage2/disp8 264 # . error(ed, err, msg) # TODO: show full number 265 # . . push args 266 68/push "get-num: too many digits in number"/imm32 @@ -355,7 +355,7 @@ if ('onhashchange' in window) { 294 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 295 # . if (eax != false) loop 296 3d/compare-eax-and 0/imm32/false -297 0f 85/jump-if-not-equal $get-num:loop/disp32 +297 0f 85/jump-if-!= $get-num:loop/disp32 298 $get-num:loop-end: 299 # persist necessary variables from registers 300 89/copy 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . . # copy ecx to *edi @@ -798,10 +798,10 @@ if ('onhashchange' in window) { 737 b8/copy-to-eax 0/imm32 738 # if (c < '0') return false 739 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x30/imm32 # compare *(ebp+8) -740 7c/jump-if-lesser $is-digit?:end/disp8 +740 7c/jump-if-< $is-digit?:end/disp8 741 # if (c > '9') return false 742 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x39/imm32 # compare *(ebp+8) -743 7f/jump-if-greater $is-digit?:end/disp8 +743 7f/jump-if-> $is-digit?:end/disp8 744 # otherwise return true 745 b8/copy-to-eax 1/imm32 746 $is-digit?:end: -- cgit 1.4.1-2-gfad0