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-1.subx.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'html/apps/crenshaw2-1.subx.html') diff --git a/html/apps/crenshaw2-1.subx.html b/html/apps/crenshaw2-1.subx.html index df65b7c6..e42c901c 100644 --- a/html/apps/crenshaw2-1.subx.html +++ b/html/apps/crenshaw2-1.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) @@ -285,7 +285,7 @@ if ('onhashchange' in window) { 224 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 225 # . if (eax == false) 226 3d/compare-eax-and 0/imm32/false -227 75/jump-if-not-equal $get-num:main/disp8 +227 75/jump-if-!= $get-num:main/disp8 228 # . expected(ed, err, "integer") 229 # . . push args 230 68/push "integer"/imm32 @@ -316,7 +316,7 @@ if ('onhashchange' in window) { 255 $get-num:loop: 256 # if (out->write >= out->length) error 257 39/compare 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # compare edx with ecx -258 7d/jump-if-lesser $get-num:stage2/disp8 +258 7d/jump-if-< $get-num:stage2/disp8 259 # . error(ed, err, msg) # TODO: show full number 260 # . . push args 261 68/push "get-num: too many digits in number"/imm32 @@ -604,10 +604,10 @@ if ('onhashchange' in window) { 543 b8/copy-to-eax 0/imm32 544 # if (c < '0') return false 545 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x30/imm32 # compare *(ebp+8) -546 7c/jump-if-lesser $is-digit?:end/disp8 +546 7c/jump-if-< $is-digit?:end/disp8 547 # if (c > '9') return false 548 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x39/imm32 # compare *(ebp+8) -549 7f/jump-if-greater $is-digit?:end/disp8 +549 7f/jump-if-> $is-digit?:end/disp8 550 # otherwise return true 551 b8/copy-to-eax 1/imm32 552 $is-digit?:end: -- cgit 1.4.1-2-gfad0