diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-04-09 02:29:19 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-04-09 02:29:19 -0700 |
| commit | 8bc4975155d73b0f5909427e49d8dadadbd58331 (patch) | |
| tree | 6d08c168167c346cc2f176a585bf45d73965bc14 | |
| parent | 11ddb5937ec6f1b0156d5423c4f21f5d5b184f8d (diff) | |
implement heap versions of the addressing-mode helper words
Force-Push: yes Change-Id: I8a3362131086291f60f5f68369e819c1c030babb
| -rw-r--r-- | quine.asm | 231 |
1 files changed, 230 insertions, 1 deletions
diff --git a/quine.asm b/quine.asm index 7184925..a3cbdcc 100644 --- a/quine.asm +++ b/quine.asm @@ -3724,6 +3724,235 @@ cold_start: dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma dq early_here, fetch, lit, 8, packalign, early_here_store + ; This was "rex_w". + dq litstring, "rex-w", early_create, early_docol_codeword + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 0x48, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + ; This was "rex_wb". + dq litstring, "rex-wb", early_create, early_docol_codeword + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 0x49, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + dq litstring, "opcodereg", early_create, early_docol_codeword + dq litstring, "or", early_find, entry_to_execution_token, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + dq litstring, "opcodecc", 0, early_create, early_docol_codeword + dq litstring, "or", early_find, entry_to_execution_token, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + dq litstring, "modrm", early_create, early_docol_codeword + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 8, early_comma + dq litstring, "*", early_find, entry_to_execution_token, early_comma + dq litstring, "or", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 64, early_comma + dq litstring, "*", early_find, entry_to_execution_token, early_comma + dq litstring, "or", early_find, entry_to_execution_token, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + dq litstring, "sib", early_create, early_docol_codeword + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 8, early_comma + dq litstring, "*", early_find, entry_to_execution_token, early_comma + dq litstring, "or", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 64, early_comma + dq litstring, "*", early_find, entry_to_execution_token, early_comma + dq litstring, "or", early_find, entry_to_execution_token, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + ; This was "addressing_reg64". + dq litstring, "addressing-reg64", 0, early_create, early_docol_codeword + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 3, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "modrm", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + ; This was "addressing_indirect_reg64". + dq litstring, "addressing-indirect-reg64", early_create + dq early_docol_codeword + dq litstring, "dup", early_find, entry_to_execution_token, early_comma + dq litstring, ":rbp", early_find, entry_to_execution_token, early_comma + dq litstring, "!=", early_find, entry_to_execution_token, early_comma + dq litstring, "0branch", early_find, entry_to_execution_token, early_comma + dq lit, 23*8, early_comma + dq litstring, "dup", early_find, entry_to_execution_token, early_comma + dq litstring, ":rsp", early_find, entry_to_execution_token, early_comma + dq litstring, "=", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 4, early_comma + dq litstring, "unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 0, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "modrm", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "0branch", early_find, entry_to_execution_token, early_comma + dq lit, 8*8, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 0, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 4, early_comma + dq litstring, ":rsp", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "sib", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq litstring, "litstring", early_find, entry_to_execution_token, early_comma + dq lit, "R/M para", early_comma, lit, "meter to", early_comma + dq lit, " address", early_comma, lit, "ing-indi", early_comma + dq lit, "rect-reg", early_comma, lit, "64 is :r", early_comma + dq lit, "bp.", early_comma + dq litstring, "emitstring", early_find, entry_to_execution_token + dq early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 1, early_comma + dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + ; This was "addressing_disp8_reg64". + dq litstring, "addressing-disp8-reg64", early_create + dq early_docol_codeword + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "dup", early_find, entry_to_execution_token, early_comma + dq litstring, ":rsp", early_find, entry_to_execution_token, early_comma + dq litstring, "=", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 5, early_comma + dq litstring, "unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 4, early_comma + dq litstring, "unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 1, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "modrm", early_find, entry_to_execution_token, early_comma + dq litstring, "3roll", early_find, entry_to_execution_token, early_comma + dq litstring, "0branch", early_find, entry_to_execution_token, early_comma + dq lit, 8*8, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 0, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 4, early_comma + dq litstring, ":rsp", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "sib", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + ; This was "addressing_indexed_reg64". + dq litstring, "addressing-indexed-reg64", 0, early_create + dq early_docol_codeword + dq litstring, "dup", early_find, entry_to_execution_token, early_comma + dq litstring, ":rbp", early_find, entry_to_execution_token, early_comma + dq litstring, "!=", early_find, entry_to_execution_token, early_comma + dq litstring, "0branch", early_find, entry_to_execution_token, early_comma + dq lit, 23*8, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 5, early_comma + dq litstring, "roll", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 0, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 6, early_comma + dq litstring, "roll", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 4, early_comma + dq litstring, "modrm", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 4, early_comma + dq litstring, "unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "scalefield", early_find, entry_to_execution_token, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "sib", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq litstring, "litstring", early_find, entry_to_execution_token, early_comma + dq lit, "Base par", early_comma, lit, "ameter t", early_comma + dq lit, "o addres", early_comma, lit, "sing-ind", early_comma + dq lit, "exed-reg", early_comma, lit, "64 is :r", early_comma + dq lit, "bp.", early_comma + dq litstring, "emitstring", early_find, entry_to_execution_token + dq early_comma + dq lit, 1, early_comma + dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + ; This was "addressing_disp8_indexed_reg64". + dq litstring, "addressing-disp8-indexed-reg64", early_create + dq early_docol_codeword + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 6, early_comma + dq litstring, "roll", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 1, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 7, early_comma + dq litstring, "roll", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 4, early_comma + dq litstring, "modrm", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 5, early_comma + dq litstring, "unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 5, early_comma + dq litstring, "unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "reg64", early_find, entry_to_execution_token, early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "scalefield", early_find, entry_to_execution_token + dq early_comma + dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma + dq litstring, "sib", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "pack8", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + + ; This was "addressing_reg8". + dq litstring, "addressing-reg8", early_create + dq early_docol_codeword + dq litstring, "reg8", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 3, early_comma + dq litstring, "unroll3", early_find, entry_to_execution_token, early_comma + dq litstring, "modrm", early_find, entry_to_execution_token, early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + dq early_describe_all, lit, 0, sys_exit ;;; For triage's sake, here's an inventory of everything else in the file. @@ -5545,7 +5774,7 @@ defword addressing_disp8_reg64, 0 defword addressing_indexed_reg64, 0 dq docol ; Exit with an error if the base register is rbp. - dq dup, rbp, ne, zbranch, 5*8;, 17*8 + dq dup, rbp, ne, zbranch, 23*8 ; Reg/mem value 4 means to use an SIB byte (at least, with this mode). dq lit, 5, roll, lit, 0, lit, 6, roll, lit, 4, modrm, lit, 4, unroll dq reg64, unroll3, reg64, unroll3, scalefield, unroll3, sib |