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/mu.subx.html | 220 ++++++++++++++++++++++++------------------------- 1 file changed, 110 insertions(+), 110 deletions(-) (limited to 'html/apps/mu.subx.html') diff --git a/html/apps/mu.subx.html b/html/apps/mu.subx.html index f8e3cd69..a16e5c67 100644 --- a/html/apps/mu.subx.html +++ b/html/apps/mu.subx.html @@ -436,11 +436,11 @@ if ('onhashchange' in window) { 374 { 375 # if (argc <= 1) break 376 81 7/subop/compare *ebp 1/imm32 - 377 7e/jump-if-lesser-or-equal break/disp8 + 377 7e/jump-if-<= break/disp8 378 # if (argv[1] != "test") break 379 (kernel-string-equal? *(ebp+8) "test") # => eax 380 3d/compare-eax-and 0/imm32 - 381 74/jump-if-equal break/disp8 + 381 74/jump-if-= break/disp8 382 # 383 (run-tests) 384 # syscall(exit, *Num-test-failures) @@ -1042,13 +1042,13 @@ if ('onhashchange' in window) { 1025 (read-line-buffered *(ebp+8) %ecx) 1026 # if (line->write == 0) break 1027 81 7/subop/compare *ecx 0/imm32 -1028 0f 84/jump-if-equal break/disp32 +1028 0f 84/jump-if-= break/disp32 1029 +-- 6 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------- 1035 (next-word-or-string %ecx %edx) 1036 # if slice-empty?(word-slice) continue 1037 (slice-empty? %edx) 1038 3d/compare-eax-and 0/imm32 -1039 0f 85/jump-if-not-equal loop/disp32 +1039 0f 85/jump-if-!= loop/disp32 1040 # if (*word-slice->start == "#") continue 1041 # . eax = *word-slice->start 1042 8b/-> *edx 0/r32/eax @@ -1056,13 +1056,13 @@ if ('onhashchange' in window) { 1044 81 4/subop/and %eax 0xff/imm32 1045 # . if (eax == '#') continue 1046 3d/compare-eax-and 0x23/imm32/hash -1047 0f 84/jump-if-equal loop/disp32 +1047 0f 84/jump-if-= loop/disp32 1048 # if (slice-equal?(word-slice, "fn")) parse a function 1049 { 1050 $parse-mu:fn: 1051 (slice-equal? %edx "fn") 1052 3d/compare-eax-and 0/imm32 -1053 0f 84/jump-if-equal break/disp32 +1053 0f 84/jump-if-= break/disp32 1054 # var new-function/eax : (handle function) = populate-mu-function(in, new-function, vars) 1055 (allocate Heap *Function-size) # => eax 1056 (zero-out %eax *Function-size) @@ -1181,15 +1181,15 @@ if ('onhashchange' in window) { 1169 # if (word-slice == '{') abort 1170 (slice-equal? %ecx "{") # => eax 1171 3d/compare-eax-and 0/imm32 -1172 0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32 +1172 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32 1173 # if (word-slice == '->') abort 1174 (slice-equal? %ecx "->") # => eax 1175 3d/compare-eax-and 0/imm32 -1176 0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32 +1176 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32 1177 # if (word-slice == '}') abort 1178 (slice-equal? %ecx "}") # => eax 1179 3d/compare-eax-and 0/imm32 -1180 0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32 +1180 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32 1181 # save function name 1182 (slice-to-string Heap %ecx) # => eax 1183 89/<- *edi 0/r32/eax # Function-name @@ -1202,21 +1202,21 @@ if ('onhashchange' in window) { 1190 # if (word-slice == '{') goto done 1191 (slice-equal? %ecx "{") # => eax 1192 3d/compare-eax-and 0/imm32 -1193 0f 85/jump-if-not-equal $populate-mu-function-header:done/disp32 +1193 0f 85/jump-if-!= $populate-mu-function-header:done/disp32 1194 # if (word-slice == '->') break 1195 (slice-equal? %ecx "->") # => eax 1196 3d/compare-eax-and 0/imm32 -1197 0f 85/jump-if-not-equal break/disp32 +1197 0f 85/jump-if-!= break/disp32 1198 # if (word-slice == '}') abort 1199 (slice-equal? %ecx "}") # => eax 1200 3d/compare-eax-and 0/imm32 -1201 0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32 +1201 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32 1202 # var v/ebx : (handle var) = parse-var-with-type(word-slice, first-line) 1203 (parse-var-with-type %ecx *(ebp+8)) # => eax 1204 89/<- %ebx 0/r32/eax 1205 # assert(v->register == null) 1206 81 7/subop/compare *(ebx+0x10) 0/imm32 # Var-register -1207 0f 85/jump-if-not-equal $populate-mu-function-header:error2/disp32 +1207 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32 1208 # v->stack-offset = next-offset 1209 89/<- *(ebx+0xc) 2/r32/edx # Var-stack-offset 1210 # next-offset += size-of(v) @@ -1236,21 +1236,21 @@ if ('onhashchange' in window) { 1224 # if (word-slice == '{') break 1225 (slice-equal? %ecx "{") # => eax 1226 3d/compare-eax-and 0/imm32 -1227 0f 85/jump-if-not-equal break/disp32 +1227 0f 85/jump-if-!= break/disp32 1228 # if (word-slice == '->') abort 1229 (slice-equal? %ecx "->") # => eax 1230 3d/compare-eax-and 0/imm32 -1231 0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32 +1231 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32 1232 # if (word-slice == '}') abort 1233 (slice-equal? %ecx "}") # => eax 1234 3d/compare-eax-and 0/imm32 -1235 0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32 +1235 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32 1236 # 1237 (parse-var-with-type %ecx *(ebp+8)) # => eax 1238 89/<- %ebx 0/r32/eax 1239 # assert(var->register != null) 1240 81 7/subop/compare *(ebx+0x10) 0/imm32 # Var-register -1241 0f 84/jump-if-equal $populate-mu-function-header:error3/disp32 +1241 0f 84/jump-if-= $populate-mu-function-header:error3/disp32 1242 (append-list Heap %ebx *(edi+0xc)) # Function-outputs => eax 1243 89/<- *(edi+0xc) 0/r32/eax # Function-outputs 1244 e9/jump loop/disp32 @@ -1534,7 +1534,7 @@ if ('onhashchange' in window) { 1522 8a/copy-byte *eax 3/r32/BL 1523 81 4/subop/and %ebx 0xff/imm32 1524 81 7/subop/compare %ebx 0x3a/imm32/colon -1525 75/jump-if-not-equal break/disp8 +1525 75/jump-if-!= break/disp8 1526 89/<- *(ecx+4) 0/r32/eax 1527 } 1528 # . if s ends with ',', decrement s->end @@ -1544,7 +1544,7 @@ if ('onhashchange' in window) { 1532 8a/copy-byte *eax 3/r32/BL 1533 81 4/subop/and %ebx 0xff/imm32 1534 81 7/subop/compare %ebx 0x2c/imm32/comma -1535 75/jump-if-not-equal break/disp8 +1535 75/jump-if-!= break/disp8 1536 89/<- *(ecx+4) 0/r32/eax 1537 } 1538 $parse-var-with-type:write-name: @@ -1560,7 +1560,7 @@ if ('onhashchange' in window) { 1548 8a/copy-byte *eax 3/r32/BL 1549 81 4/subop/and %ebx 0xff/imm32 1550 81 7/subop/compare %ebx 0x3a/imm32/colon -1551 75/jump-if-not-equal break/disp8 +1551 75/jump-if-!= break/disp8 1552 89/<- *(ecx+4) 0/r32/eax 1553 } 1554 # . if s ends with ',', decrement s->end @@ -1570,7 +1570,7 @@ if ('onhashchange' in window) { 1558 8a/copy-byte *eax 3/r32/BL 1559 81 4/subop/and %ebx 0xff/imm32 1560 81 7/subop/compare %ebx 0x2c/imm32/comma -1561 75/jump-if-not-equal break/disp8 +1561 75/jump-if-!= break/disp8 1562 89/<- *(ecx+4) 0/r32/eax 1563 } 1564 # if (!slice-empty?(s)) v->register = slice-to-string(s) @@ -1580,7 +1580,7 @@ if ('onhashchange' in window) { 1568 # That's probably a sign we have the wrong algorithm for this function. 1569 8b/-> *ecx 0/r32/eax 1570 39/compare 0/r32/eax *(ecx+4) -1571 76/jump-if-lesser-or-equal break/disp8 +1571 76/jump-if-<= break/disp8 1572 (slice-to-string Heap %ecx) 1573 89/<- *(edi+0x10) 0/r32/eax # Var-register 1574 } @@ -1589,33 +1589,33 @@ if ('onhashchange' in window) { 1577 # if (word-slice == '{') abort 1578 (slice-equal? %ecx "{") # => eax 1579 3d/compare-eax-and 0/imm32 -1580 0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32 +1580 0f 85/jump-if-!= $parse-var-with-type:abort/disp32 1581 # if (word-slice == '->') abort 1582 (slice-equal? %ecx "->") # => eax 1583 3d/compare-eax-and 0/imm32 -1584 0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32 +1584 0f 85/jump-if-!= $parse-var-with-type:abort/disp32 1585 # if (word-slice == '}') abort 1586 (slice-equal? %ecx "}") # => eax 1587 3d/compare-eax-and 0/imm32 -1588 0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32 +1588 0f 85/jump-if-!= $parse-var-with-type:abort/disp32 1589 # if (slice-empty?(type)) skip 1590 (slice-empty? %ecx) 1591 { 1592 3d/compare-eax-and 0/imm32 -1593 0f 84/jump-if-equal break/disp32 +1593 0f 84/jump-if-= break/disp32 1594 (next-mu-token *(ebp+0xc) %ecx) 1595 # if (word-slice == '{') abort 1596 (slice-equal? %ecx "{") # => eax 1597 3d/compare-eax-and 0/imm32 -1598 0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32 +1598 0f 85/jump-if-!= $parse-var-with-type:abort/disp32 1599 # if (word-slice == '->') abort 1600 (slice-equal? %ecx "->") # => eax 1601 3d/compare-eax-and 0/imm32 -1602 0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32 +1602 0f 85/jump-if-!= $parse-var-with-type:abort/disp32 1603 # if (word-slice == '}') abort 1604 (slice-equal? %ecx "}") # => eax 1605 3d/compare-eax-and 0/imm32 -1606 0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32 +1606 0f 85/jump-if-!= $parse-var-with-type:abort/disp32 1607 } 1608 (type-for %ecx) # => eax 1609 89/<- *(edi+4) 0/r32/eax # Var-type @@ -1667,7 +1667,7 @@ if ('onhashchange' in window) { 1655 8a/copy-byte *eax 3/r32/BL 1656 81 4/subop/and %ebx 0xff/imm32 1657 81 7/subop/compare %ebx 0x3a/imm32/colon -1658 75/jump-if-not-equal break/disp8 +1658 75/jump-if-!= break/disp8 1659 89/<- *(edi+4) 0/r32/eax 1660 } 1661 # if out ends with ',', decrement out->end @@ -1677,7 +1677,7 @@ if ('onhashchange' in window) { 1665 8a/copy-byte *eax 3/r32/BL 1666 81 4/subop/and %ebx 0xff/imm32 1667 81 7/subop/compare %ebx 0x2c/imm32/comma -1668 75/jump-if-not-equal break/disp8 +1668 75/jump-if-!= break/disp8 1669 89/<- *(edi+4) 0/r32/eax 1670 } 1671 $next-mu-token:end: @@ -1734,14 +1734,14 @@ if ('onhashchange' in window) { 1722 # if (curr >= max) return -1 1723 39/compare %edx 3/r32/ebx 1724 { -1725 72/jump-if-lesser-unsigned break/disp8 +1725 72/jump-if-addr< break/disp8 1726 b8/copy-to-eax 1/imm32 1727 eb/jump $pos-slice:end/disp8 1728 } 1729 # if (slice-equal?(s, *curr)) break 1730 (slice-equal? *(ebp+0xc) *edx) # => eax 1731 3d/compare-eax-and 0/imm32 -1732 75/jump-if-not-equal break/disp8 +1732 75/jump-if-!= break/disp8 1733 # ++index 1734 41/increment-ecx 1735 # curr += 4 @@ -1913,7 +1913,7 @@ if ('onhashchange' in window) { 1901 # if (slice-empty?(in)) return false 1902 (slice-empty? *(ebp+8)) # => eax 1903 3d/compare-eax-and 0/imm32 -1904 75/jump-if-not-equal $is-identifier?:false/disp8 +1904 75/jump-if-!= $is-identifier?:false/disp8 1905 # var c/eax : byte = *in->start 1906 8b/-> *(ebp+8) 0/r32/eax 1907 8b/-> *eax 0/r32/eax @@ -1921,18 +1921,18 @@ if ('onhashchange' in window) { 1909 81 4/subop/and %eax 0xff/imm32 1910 # if (c == '$') return true 1911 3d/compare-eax-and 0x24/imm32/$ -1912 74/jump-if-equal $is-identifier?:true/disp8 +1912 74/jump-if-= $is-identifier?:true/disp8 1913 # if (c == '_') return true 1914 3d/compare-eax-and 0x5f/imm32/_ -1915 74/jump-if-equal $is-identifier?:true/disp8 +1915 74/jump-if-= $is-identifier?:true/disp8 1916 # drop case 1917 25/and-eax-with 0x5f/imm32 1918 # if (c < 'A') return false 1919 3d/compare-eax-and 0x41/imm32/A -1920 7c/jump-if-lesser $is-identifier?:false/disp8 +1920 7c/jump-if-< $is-identifier?:false/disp8 1921 # if (c > 'Z') return false 1922 3d/compare-eax-and 0x5a/imm32/Z -1923 7f/jump-if-greater $is-identifier?:false/disp8 +1923 7f/jump-if-> $is-identifier?:false/disp8 1924 # otherwise return true 1925 $is-identifier?:true: 1926 b8/copy-to-eax 1/imm32/true @@ -2294,7 +2294,7 @@ if ('onhashchange' in window) { 2282 #? (flush Stderr) 2283 # if (line->write == 0) break 2284 81 7/subop/compare *ecx 0/imm32 -2285 0f 84/jump-if-equal break/disp32 +2285 0f 84/jump-if-= break/disp32 2286 # word-slice = next-word(line) 2287 (next-word %ecx %edx) 2288 #? (write-buffered Stderr "word: ") @@ -2304,7 +2304,7 @@ if ('onhashchange' in window) { 2292 # if slice-empty?(word-slice) continue 2293 (slice-empty? %edx) 2294 3d/compare-eax-and 0/imm32 -2295 0f 85/jump-if-not-equal loop/disp32 +2295 0f 85/jump-if-!= loop/disp32 2296 # if (slice-starts-with?(word-slice, '#') continue 2297 # . eax = *word-slice->start 2298 8b/-> *edx 0/r32/eax @@ -2312,13 +2312,13 @@ if ('onhashchange' in window) { 2300 81 4/subop/and %eax 0xff/imm32 2301 # . if (eax == '#') continue 2302 3d/compare-eax-and 0x23/imm32/hash -2303 0f 84/jump-if-equal loop/disp32 +2303 0f 84/jump-if-= loop/disp32 2304 # if slice-equal?(word-slice, "{") 2305 { 2306 $parse-mu-block:check-for-block: 2307 (slice-equal? %edx "{") 2308 3d/compare-eax-and 0/imm32 -2309 74/jump-if-equal break/disp8 +2309 74/jump-if-= break/disp8 2310 (check-no-tokens-left %ecx) 2311 # parse new block and append 2312 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10)) # => eax @@ -2329,7 +2329,7 @@ if ('onhashchange' in window) { 2317 $parse-mu-block:check-for-end: 2318 (slice-equal? %edx "}") 2319 3d/compare-eax-and 0/imm32 -2320 0f 85/jump-if-not-equal break/disp32 +2320 0f 85/jump-if-!= break/disp32 2321 # if slice-ends-with?(word-slice, ":") parse named block and append 2322 { 2323 $parse-mu-block:check-for-named-block: @@ -2339,7 +2339,7 @@ if ('onhashchange' in window) { 2327 81 4/subop/and %eax 0xff/imm32 2328 # . if (eax != ':') break 2329 3d/compare-eax-and 0x23/imm32/hash -2330 0f 85/jump-if-not-equal break/disp32 +2330 0f 85/jump-if-!= break/disp32 2331 # 2332 (parse-mu-named-block %edx %ecx *(ebp+8) *(ebp+0xc) *(ebp+0x10)) # => eax 2333 (append-to-block %edi %eax) @@ -2350,7 +2350,7 @@ if ('onhashchange' in window) { 2338 $parse-mu-block:check-for-var: 2339 (slice-equal? %edx "var") 2340 3d/compare-eax-and 0/imm32 -2341 74/jump-if-equal break/disp8 +2341 74/jump-if-= break/disp8 2342 # 2343 (parse-mu-var-def %ecx *(ebp+0xc)) # => eax 2344 (append-to-block %edi %eax) @@ -2406,7 +2406,7 @@ if ('onhashchange' in window) { 2394 # if slice-empty?(s) return 2395 (slice-empty? %ecx) 2396 3d/compare-eax-and 0/imm32 -2397 75/jump-if-not-equal $check-no-tokens-left:end/disp8 +2397 75/jump-if-!= $check-no-tokens-left:end/disp8 2398 # if (slice-starts-with?(s, '#') return 2399 # . eax = *s->start 2400 8b/-> *edx 0/r32/eax @@ -2414,7 +2414,7 @@ if ('onhashchange' in window) { 2402 81 4/subop/and %eax 0xff/imm32 2403 # . if (eax == '#') continue 2404 3d/compare-eax-and 0x23/imm32/hash -2405 74/jump-if-equal $check-no-tokens-left:end/disp8 +2405 74/jump-if-= $check-no-tokens-left:end/disp8 2406 # abort 2407 (write-buffered Stderr "'{' or '}' should be on its own line, but got '") 2408 (rewind-stream %ecx) @@ -2532,7 +2532,7 @@ if ('onhashchange' in window) { 2520 { 2521 (stmt-has-outputs? *(ebp+8)) 2522 3d/compare-eax-and 0/imm32 -2523 0f 84/jump-if-equal break/disp32 +2523 0f 84/jump-if-= break/disp32 2524 { 2525 $parse-mu-stmt:read-outputs: 2526 # name = next-word(line) @@ -2540,15 +2540,15 @@ if ('onhashchange' in window) { 2528 # if slice-empty?(word-slice) break 2529 (slice-empty? %ecx) 2530 3d/compare-eax-and 0/imm32 -2531 0f 85/jump-if-not-equal break/disp32 +2531 0f 85/jump-if-!= break/disp32 2532 # if (name == "<-") break 2533 (slice-equal? %ecx "<-") 2534 3d/compare-eax-and 0/imm32 -2535 75/jump-if-not-equal break/disp8 +2535 75/jump-if-!= break/disp8 2536 # assert(is-identifier?(name)) 2537 (is-identifier? %ecx) 2538 3d/compare-eax-and 0/imm32 -2539 0f 84/jump-if-equal $parse-mu-stmt:abort/disp32 +2539 0f 84/jump-if-= $parse-mu-stmt:abort/disp32 2540 # 2541 (lookup-or-define-var %ecx *(ebp+0xc) *(ebp+0x10)) # => eax 2542 (append-list Heap %eax *(edi+0xc)) # Stmt1-outputs => eax @@ -2567,11 +2567,11 @@ if ('onhashchange' in window) { 2555 # if slice-empty?(word-slice) break 2556 (slice-empty? %ecx) 2557 3d/compare-eax-and 0/imm32 -2558 0f 85/jump-if-not-equal break/disp32 +2558 0f 85/jump-if-!= break/disp32 2559 # if (name == "<-") abort 2560 (slice-equal? %ecx "<-") 2561 3d/compare-eax-and 0/imm32 -2562 0f 85/jump-if-not-equal $parse-mu-stmt:abort2/disp32 +2562 0f 85/jump-if-!= $parse-mu-stmt:abort2/disp32 2563 # 2564 (lookup-var-or-literal %ecx *(ebp+0xc)) # => eax 2565 (append-list Heap %eax *(edi+8)) # Stmt1-inouts => eax @@ -2635,7 +2635,7 @@ if ('onhashchange' in window) { 2623 (slice-empty? %ecx) 2624 3d/compare-eax-and 0/imm32 2625 b8/copy-to-eax 0/imm32/false/result # restore result (if we're here it's still false) -2626 0f 85/jump-if-not-equal break/disp32 +2626 0f 85/jump-if-!= break/disp32 2627 # if slice-starts-with?(word-slice, '#') break 2628 # . eax = *word-slice->start 2629 8b/-> *ecx 0/r32/eax @@ -2644,11 +2644,11 @@ if ('onhashchange' in window) { 2632 # . if (eax == '#') break 2633 3d/compare-eax-and 0x23/imm32/hash 2634 b8/copy-to-eax 0/imm32/false/result # restore result (if we're here it's still false) -2635 0f 84/jump-if-equal break/disp32 +2635 0f 84/jump-if-= break/disp32 2636 # if slice-equal?(word-slice, '<-') return true 2637 (slice-equal? %ecx "<-") 2638 3d/compare-eax-and 0/imm32 -2639 74/jump-if-equal loop/disp8 +2639 74/jump-if-= loop/disp8 2640 b8/copy-to-eax 1/imm32/true 2641 } 2642 $stmt-has-outputs:end: @@ -2676,7 +2676,7 @@ if ('onhashchange' in window) { 2664 # if slice-empty?(name) abort 2665 (slice-empty? %esi) # => eax 2666 3d/compare-eax-and 0/imm32 -2667 0f 85/jump-if-not-equal $lookup-var-or-literal:abort/disp32 +2667 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32 2668 # var ecx : byte = *name->start 2669 8b/-> *esi 1/r32/ecx 2670 8a/copy-byte *ecx 1/r32/CL @@ -2685,12 +2685,12 @@ if ('onhashchange' in window) { 2673 (is-decimal-digit? %ecx) # => eax 2674 81 7/subop/compare %eax 0/imm32 2675 { -2676 74/jump-if-equal break/disp8 +2676 74/jump-if-= break/disp8 2677 (new-literal-integer Heap %esi) # => eax 2678 } 2679 # otherwise return lookup-var(name, vars) 2680 { -2681 75/jump-if-not-equal break/disp8 +2681 75/jump-if-!= break/disp8 2682 (lookup-var %esi *(ebp+0xc)) # => eax 2683 } 2684 $lookup-var-or-literal:end: @@ -2722,7 +2722,7 @@ if ('onhashchange' in window) { 2710 (lookup-var-helper %eax *(ebp+0xc)) # => eax 2711 # if (result == 0) abort 2712 3d/compare-eax-and 0/imm32 -2713 74/jump-if-equal $lookup-var:abort/disp8 +2713 74/jump-if-= $lookup-var:abort/disp8 2714 $lookup-var:end: 2715 # . epilogue 2716 89/<- %esp 5/r32/ebp @@ -2764,7 +2764,7 @@ if ('onhashchange' in window) { 2752 8b/-> *esi 3/r32/ebx 2753 # if (vars->top > vars->length) abort 2754 3b/compare 0/r32/eax *(esi+4) -2755 0f 8f/jump-if-greater $lookup-var-helper:error1/disp32 +2755 0f 8f/jump-if-> $lookup-var-helper:error1/disp32 2756 # var min/edx : (addr handle var) = vars->data 2757 8d/copy-address *(esi+8) 2/r32/edx 2758 # var curr/ebx : (addr handle var) = &vars->data[vars->top - 4] @@ -2774,14 +2774,14 @@ if ('onhashchange' in window) { 2762 # if (curr < min) return 0 2763 39/compare %ebx 2/r32/edx 2764 b8/copy-to-eax 0/imm32 -2765 0f 82/jump-if-lesser-unsigned break/disp32 +2765 0f 82/jump-if-addr< break/disp32 2766 # var v/eax : (handle var) = *curr 2767 8b/-> *ebx 0/r32/eax 2768 # if (v->name == name) return v 2769 (string-equal? *eax *(ebp+8)) # Var-name 2770 3d/compare-eax-and 0/imm32 2771 8b/-> *ebx 0/r32/eax -2772 75/jump-if-not-equal break/disp8 +2772 75/jump-if-!= break/disp8 2773 # curr -= 4 2774 81 5/subop/subtract %ebx 4/imm32 2775 e9/jump loop/disp32 @@ -2822,13 +2822,13 @@ if ('onhashchange' in window) { 2810 { 2811 # if (result != 0) return 2812 3d/compare-eax-and 0/imm32 -2813 75/jump-if-not-equal break/disp8 +2813 75/jump-if-!= break/disp8 2814 # if name is one of fn's outputs, return it 2815 { 2816 (find-in-function-outputs *(ebp+0x10) %ecx) # => eax 2817 3d/compare-eax-and 0/imm32 2818 # otherwise abort -2819 0f 84/jump-if-not-equal $lookup-var:abort/disp32 +2819 0f 84/jump-if-!= $lookup-var:abort/disp32 2820 } 2821 } 2822 $lookup-or-define-var:end: @@ -2851,7 +2851,7 @@ if ('onhashchange' in window) { 2839 # while curr != null 2840 { 2841 81 7/subop/compare %ecx 0/imm32 -2842 74/jump-if-equal break/disp8 +2842 74/jump-if-= break/disp8 2843 # var v : (handle var) = *curr 2844 8b/-> *ecx 0/r32/eax # List-value 2845 # if (curr->name == name) return curr @@ -2859,7 +2859,7 @@ if ('onhashchange' in window) { 2847 (string-equal? *eax *(ebp+0xc)) 2848 3d/compare-eax-and 0/imm32 2849 58/pop-to-eax -2850 75/jump-if-not-equal $find-in-function-outputs:end/disp8 +2850 75/jump-if-!= $find-in-function-outputs:end/disp8 2851 # curr = curr->next 2852 8b/-> *(ecx+4) 1/r32/ecx # List-next 2853 eb/jump loop/disp8 @@ -2972,7 +2972,7 @@ if ('onhashchange' in window) { 2960 # if (!is-hex-int?(name)) abort 2961 (is-hex-int? *(ebp+0xc)) # => eax 2962 3d/compare-eax-and 0/imm32 -2963 0f 84/jump-if-equal $new-literal-integer:abort/disp32 +2963 0f 84/jump-if-= $new-literal-integer:abort/disp32 2964 # var s/ecx : (addr array byte) 2965 (slice-to-string Heap *(ebp+0xc)) # => eax 2966 89/<- %ecx 0/r32/eax @@ -3149,14 +3149,14 @@ if ('onhashchange' in window) { 3137 89/<- *eax 1/r32/ecx # List-value 3138 # if (list == null) return result 3139 81 7/subop/compare *(ebp+0x10) 0/imm32 -3140 74/jump-if-equal $new-list:end/disp8 +3140 74/jump-if-= $new-list:end/disp8 3141 # otherwise append 3142 # var curr/ecx = list 3143 8b/-> *(ebp+0x10) 1/r32/ecx 3144 # while (curr->next != null) curr = curr->next 3145 { 3146 81 7/subop/compare *(ecx+4) 0/imm32 # List-next -3147 74/jump-if-equal break/disp8 +3147 74/jump-if-= break/disp8 3148 # curr = curr->next 3149 8b/-> *(ecx+4) 1/r32/ecx 3150 eb/jump loop/disp8 @@ -3237,7 +3237,7 @@ if ('onhashchange' in window) { 3225 { 3226 # if (curr == null) break 3227 81 7/subop/compare %ecx 0/imm32 -3228 0f 84/jump-if-equal break/disp32 +3228 0f 84/jump-if-= break/disp32 3229 (emit-subx-function %edi %ecx) 3230 # curr = curr->next 3231 8b/-> *(ecx+0x14) 1/r32/ecx # Function-next @@ -3292,12 +3292,12 @@ if ('onhashchange' in window) { 3280 { 3281 $emit-subx-block:check-empty: 3282 81 7/subop/compare %esi 0/imm32 -3283 0f 84/jump-if-equal break/disp32 +3283 0f 84/jump-if-= break/disp32 3284 (write-buffered *(ebp+8) "{\n") 3285 { 3286 $emit-subx-block:stmt: 3287 81 7/subop/compare %esi 0/imm32 -3288 74/jump-if-equal break/disp8 +3288 74/jump-if-= break/disp8 3289 (emit-subx-statement *(ebp+8) *esi Primitives *Program) 3290 (write-buffered *(ebp+8) Newline) 3291 8b/-> *(esi+4) 6/r32/esi # List-next @@ -3323,7 +3323,7 @@ if ('onhashchange' in window) { 3311 $emit-subx-statement:primitive: 3312 (find-matching-primitive *(ebp+0x10) *(ebp+0xc)) # primitives, stmt => curr/eax 3313 3d/compare-eax-and 0/imm32 -3314 74/jump-if-equal break/disp8 +3314 74/jump-if-= break/disp8 3315 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax) # out, stmt, curr 3316 e9/jump $emit-subx-statement:end/disp32 3317 } @@ -3332,7 +3332,7 @@ if ('onhashchange' in window) { 3320 $emit-subx-statement:call: 3321 (find-matching-function *(ebp+0x14) *(ebp+0xc)) # functions, stmt => curr/eax 3322 3d/compare-eax-and 0/imm32 -3323 74/jump-if-equal break/disp8 +3323 74/jump-if-= break/disp8 3324 (emit-subx-call *(ebp+8) *(ebp+0xc) %eax) # out, stmt, curr 3325 e9/jump $emit-subx-statement:end/disp32 3326 } @@ -4148,7 +4148,7 @@ if ('onhashchange' in window) { 4136 50/push-eax 4137 # if (l == 0) return 4138 81 7/subop/compare *(ebp+0xc) 0/imm32 -4139 74/jump-if-equal $emit-subx-rm32:end/disp8 +4139 74/jump-if-= $emit-subx-rm32:end/disp8 4140 # 4141 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc)) # stmt, l => var/eax 4142 (emit-subx-var-as-rm32 *(ebp+8) %eax) # out, var @@ -4173,7 +4173,7 @@ if ('onhashchange' in window) { 4161 # if (l == 1) return stmt->inouts->var 4162 { 4163 3d/compare-eax-and 1/imm32 -4164 75/jump-if-not-equal break/disp8 +4164 75/jump-if-!= break/disp8 4165 $get-stmt-operand-from-arg-location:1: 4166 8b/-> *(ecx+8) 0/r32/eax # Stmt1-inouts 4167 8b/-> *eax 0/r32/eax # Operand-var @@ -4182,7 +4182,7 @@ if ('onhashchange' in window) { 4170 # if (l == 2) return stmt->inouts->next->var 4171 { 4172 3d/compare-eax-and 2/imm32 -4173 75/jump-if-not-equal break/disp8 +4173 75/jump-if-!= break/disp8 4174 $get-stmt-operand-from-arg-location:2: 4175 8b/-> *(ecx+8) 0/r32/eax # Stmt1-inouts 4176 8b/-> *(eax+4) 0/r32/eax # Operand-next @@ -4192,7 +4192,7 @@ if ('onhashchange' in window) { 4180 # if (l == 3) return stmt->outputs 4181 { 4182 3d/compare-eax-and 3/imm32 -4183 75/jump-if-not-equal break/disp8 +4183 75/jump-if-!= break/disp8 4184 $get-stmt-operand-from-arg-location:3: 4185 8b/-> *(ecx+0xc) 0/r32/eax # Stmt1-outputs 4186 8b/-> *eax 0/r32/eax # Operand-var @@ -4229,7 +4229,7 @@ if ('onhashchange' in window) { 4217 51/push-ecx 4218 # if (location == 0) return 4219 81 7/subop/compare *(ebp+0xc) 0/imm32 -4220 0f 84/jump-if-equal $emit-subx-r32:end/disp32 +4220 0f 84/jump-if-= $emit-subx-r32:end/disp32 4221 # 4222 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc)) # stmt, l => var/eax 4223 (maybe-get Registers *(eax+0x10) 8) # Var-register => eax : (addr register-index) @@ -4254,7 +4254,7 @@ if ('onhashchange' in window) { 4242 51/push-ecx 4243 # if (location == 0) return 4244 81 7/subop/compare *(ebp+0xc) 0/imm32 -4245 74/jump-if-equal $emit-subx-imm32:end/disp8 +4245 74/jump-if-= $emit-subx-imm32:end/disp8 4246 # 4247 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc)) # stmt, l => var/eax 4248 (write-buffered *(ebp+8) Space) @@ -4288,7 +4288,7 @@ if ('onhashchange' in window) { 4276 { 4277 # if (curr == null) break 4278 81 7/subop/compare %ecx 0/imm32 -4279 74/jump-if-equal break/disp8 +4279 74/jump-if-= break/disp8 4280 # 4281 (emit-subx-call-operand *(ebp+8) *ecx) 4282 # curr = curr->next @@ -4317,7 +4317,7 @@ if ('onhashchange' in window) { 4305 # if (operand->register) emit "%__" 4306 { 4307 81 7/subop/compare *(eax+0x10) 0/imm32 # Var-register -4308 74/jump-if-equal break/disp8 +4308 74/jump-if-= break/disp8 4309 $emit-subx-call-operand:register: 4310 (write-buffered *(ebp+8) " %") 4311 (write-buffered *(ebp+8) *(eax+0x10)) # Var-register @@ -4326,7 +4326,7 @@ if ('onhashchange' in window) { 4314 # else if (operand->stack-offset) emit "*(ebp+__)" 4315 { 4316 81 7/subop/compare *(eax+0xc) 0/imm32 # Var-stack-offset -4317 74/jump-if-equal break/disp8 +4317 74/jump-if-= break/disp8 4318 $emit-subx-call-operand:stack: 4319 (write-buffered *(ebp+8) Space) 4320 (write-buffered *(ebp+8) "*(ebp+") @@ -4341,7 +4341,7 @@ if ('onhashchange' in window) { 4329 8b/-> *(eax+4) 0/r32/eax # Var-type 4330 81 7/subop/compare *eax 0/imm32 # Tree-left 4331 58/pop-to-eax -4332 75/jump-if-not-equal break/disp8 +4332 75/jump-if-!= break/disp8 4333 $emit-subx-call-operand:literal: 4334 (write-buffered *(ebp+8) Space) 4335 (write-buffered *(ebp+8) *eax) @@ -4365,7 +4365,7 @@ if ('onhashchange' in window) { 4353 # if (operand->register) emit "%__" 4354 { 4355 81 7/subop/compare *(eax+0x10) 0/imm32 # Var-register -4356 74/jump-if-equal break/disp8 +4356 74/jump-if-= break/disp8 4357 $emit-subx-var-as-rm32:register: 4358 (write-buffered *(ebp+8) " %") 4359 (write-buffered *(ebp+8) *(eax+0x10)) # Var-register @@ -4373,7 +4373,7 @@ if ('onhashchange' in window) { 4361 # else if (operand->stack-offset) emit "*(ebp+__)" 4362 { 4363 81 7/subop/compare *(eax+0xc) 0/imm32 # Var-stack-offset -4364 74/jump-if-equal break/disp8 +4364 74/jump-if-= break/disp8 4365 $emit-subx-var-as-rm32:stack: 4366 (write-buffered *(ebp+8) Space) 4367 (write-buffered *(ebp+8) "*(ebp+") @@ -4400,12 +4400,12 @@ if ('onhashchange' in window) { 4388 { 4389 # if (curr == null) break 4390 81 7/subop/compare %ecx 0/imm32 -4391 74/jump-if-equal break/disp8 +4391 74/jump-if-= break/disp8 4392 # if match(stmt, curr) return curr 4393 { 4394 (mu-stmt-matches-function? *(ebp+0xc) %ecx) # => eax 4395 3d/compare-eax-and 0/imm32 -4396 74/jump-if-equal break/disp8 +4396 74/jump-if-= break/disp8 4397 89/<- %eax 1/r32/ecx 4398 eb/jump $find-matching-function:end/disp8 4399 } @@ -4435,7 +4435,7 @@ if ('onhashchange' in window) { 4423 $find-matching-primitive:loop: 4424 # if (curr == null) break 4425 81 7/subop/compare %ecx 0/imm32 -4426 0f 84/jump-if-equal break/disp32 +4426 0f 84/jump-if-= break/disp32 4427 #? (write-buffered Stderr "prim: ") 4428 #? (write-buffered Stderr *ecx) # Primitive-name 4429 #? (write-buffered Stderr " => ") @@ -4446,7 +4446,7 @@ if ('onhashchange' in window) { 4434 { 4435 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx) # => eax 4436 3d/compare-eax-and 0/imm32 -4437 74/jump-if-equal break/disp8 +4437 74/jump-if-= break/disp8 4438 89/<- %eax 1/r32/ecx 4439 eb/jump $find-matching-primitive:end/disp8 4440 } @@ -4507,7 +4507,7 @@ if ('onhashchange' in window) { 4495 # if (primitive->name != stmt->operation) return false 4496 (string-equal? *(ecx+4) *edx) # Stmt1-operation, Primitive-name => eax 4497 3d/compare-eax-and 0/imm32 -4498 75/jump-if-not-equal break/disp8 +4498 75/jump-if-!= break/disp8 4499 b8/copy-to-eax 0/imm32 4500 e9/jump $mu-stmt-matches-primitive?:end/disp32 4501 } @@ -4519,11 +4519,11 @@ if ('onhashchange' in window) { 4507 # if (curr == 0 && curr2 == 0) move on to check outputs 4508 { 4509 81 7/subop/compare %esi 0/imm32 -4510 75/jump-if-not-equal break/disp8 +4510 75/jump-if-!= break/disp8 4511 $mu-stmt-matches-primitive?:stmt-inout-is-null: 4512 { 4513 81 7/subop/compare %edi 0/imm32 -4514 75/jump-if-not-equal break/disp8 +4514 75/jump-if-!= break/disp8 4515 # 4516 e9/jump $mu-stmt-matches-primitive?:check-outputs/disp32 4517 } @@ -4534,7 +4534,7 @@ if ('onhashchange' in window) { 4522 # if (curr2 == 0) return false 4523 { 4524 81 7/subop/compare %edi 0/imm32 -4525 75/jump-if-not-equal break/disp8 +4525 75/jump-if-!= break/disp8 4526 $mu-stmt-matches-primitive?:prim-inout-is-null: 4527 b8/copy-to-eax 0/imm32/false 4528 e9/jump $mu-stmt-matches-primitive?:end/disp32 @@ -4543,7 +4543,7 @@ if ('onhashchange' in window) { 4531 { 4532 (operand-matches-primitive? *esi *edi) # => eax 4533 3d/compare-eax-and 0/imm32 -4534 75/jump-if-not-equal break/disp8 +4534 75/jump-if-!= break/disp8 4535 b8/copy-to-eax 0/imm32/false 4536 e9/jump $mu-stmt-matches-primitive?:end/disp32 4537 } @@ -4562,10 +4562,10 @@ if ('onhashchange' in window) { 4550 { 4551 $mu-stmt-matches-primitive?:check-output: 4552 81 7/subop/compare %esi 0/imm32 -4553 75/jump-if-not-equal break/disp8 +4553 75/jump-if-!= break/disp8 4554 { 4555 81 7/subop/compare %edi 0/imm32 -4556 75/jump-if-not-equal break/disp8 +4556 75/jump-if-!= break/disp8 4557 # return true 4558 b8/copy-to-eax 1/imm32 4559 e9/jump $mu-stmt-matches-primitive?:end/disp32 @@ -4577,7 +4577,7 @@ if ('onhashchange' in window) { 4565 # if (curr2 == 0) return false 4566 { 4567 81 7/subop/compare %edi 0/imm32 -4568 75/jump-if-not-equal break/disp8 +4568 75/jump-if-!= break/disp8 4569 b8/copy-to-eax 0/imm32 4570 e9/jump $mu-stmt-matches-primitive?:end/disp32 4571 } @@ -4585,7 +4585,7 @@ if ('onhashchange' in window) { 4573 { 4574 (operand-matches-primitive? *esi *edi) # List-value List-value => eax 4575 3d/compare-eax-and 0/imm32 -4576 75/jump-if-not-equal break/disp8 +4576 75/jump-if-!= break/disp8 4577 b8/copy-to-eax 0/imm32 4578 e9/jump $mu-stmt-matches-primitive?:end/disp32 4579 } @@ -4624,28 +4624,28 @@ if ('onhashchange' in window) { 4612 (type-equal? *(esi+4) *(edi+4)) # Var-type, Var-type => eax 4613 3d/compare-eax-and 0/imm32 4614 b8/copy-to-eax 0/imm32/false -4615 74/jump-if-equal $operand-matches-primitive?:end/disp8 +4615 74/jump-if-= $operand-matches-primitive?:end/disp8 4616 # return false if var->register doesn't match prim-var->register 4617 { 4618 # if addresses are equal, don't return here 4619 8b/-> *(esi+0x10) 0/r32/eax 4620 39/compare *(edi+0x10) 0/r32/eax -4621 74/jump-if-equal break/disp8 +4621 74/jump-if-= break/disp8 4622 # if either address is 0, return false 4623 3d/compare-eax-and 0/imm32 -4624 74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result +4624 74/jump-if-= $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result 4625 81 7/subop/compare *(edi+0x10) 0/imm32 -4626 74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result +4626 74/jump-if-= $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result 4627 # if prim-var->register is "*", return true 4628 (string-equal? *(edi+0x10) "*") # Var-register 4629 3d/compare-eax-and 0/imm32 4630 b8/copy-to-eax 1/imm32/true -4631 75/jump-if-not-equal $operand-matches-primitive?:end/disp8 +4631 75/jump-if-!= $operand-matches-primitive?:end/disp8 4632 # if string contents don't match, return false 4633 (string-equal? *(esi+0x10) *(edi+0x10)) # Var-register Var-register 4634 3d/compare-eax-and 0/imm32 4635 b8/copy-to-eax 0/imm32/false -4636 74/jump-if-equal $operand-matches-primitive?:end/disp8 +4636 74/jump-if-= $operand-matches-primitive?:end/disp8 4637 } 4638 # return true 4639 b8/copy-to-eax 1/imm32/true @@ -4673,19 +4673,19 @@ if ('onhashchange' in window) { 4661 8b/-> %ecx 0/r32/eax # Var-type 4662 39/compare %edx 0/r32/eax # Var-type 4663 b8/copy-to-eax 1/imm32/true -4664 0f 84/jump-if-equal $type-equal?:end/disp32 +4664 0f 84/jump-if-= $type-equal?:end/disp32 4665 # if (a == 0) return false 4666 81 7/subop/compare %ecx 0/imm32 4667 b8/copy-to-eax 0/imm32/false -4668 0f 84/jump-if-equal $type-equal?:end/disp32 +4668 0f 84/jump-if-= $type-equal?:end/disp32 4669 # if (b == 0) return false 4670 81 7/subop/compare %edx 0/imm32 4671 b8/copy-to-eax 0/imm32/false -4672 0f 84/jump-if-equal $type-equal?:end/disp32 +4672 0f 84/jump-if-= $type-equal?:end/disp32 4673 # if (!type-equal?(a->left, b->left)) return false 4674 (type-equal? *ecx *edx) # Tree-left, Tree-left => eax 4675 3d/compare-eax-and 0/imm32 -4676 0f 84/jump-if-equal $type-equal?:end/disp32 +4676 0f 84/jump-if-= $type-equal?:end/disp32 4677 # return type-equal?(a->right, b->right 4678 (type-equal? *(ecx+4) *(edx+4)) # Tree-right, Tree-right => eax 4679 $type-equal?:end: -- cgit 1.4.1-2-gfad0