summary refs log tree commit diff
path: root/quine.asm
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-05-23 22:47:35 -0700
committerIrene Knapp <ireneista@irenes.space>2026-05-23 22:47:35 -0700
commitfa77a37199208fa207202e62f409e1371c5f03f3 (patch)
treefc58aee7e0fbd3dc012277724622a75a3f4a9ff0 /quine.asm
parentd65031570a3f678b03b29ea8a2293e0b8fad7907 (diff)
added a couple new instructions
this turns out to be fairly involved. hex bootstrap can't come fast enough ;)

Force-Push: yes
Change-Id: Ide5d2207d745ad07c40d3c9f457cd6b491bfbcf0
Diffstat (limited to 'quine.asm')
-rw-r--r--quine.asm47
1 files changed, 47 insertions, 0 deletions
diff --git a/quine.asm b/quine.asm
index 5c085ef..7d5d9fa 100644
--- a/quine.asm
+++ b/quine.asm
@@ -3863,6 +3863,14 @@ cold_start:
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
+  ; This was "rex_b".
+  dq litstring, "rex-b", early_create, early_docol_codeword
+  dq litstring, "lit", early_find, entry_to_execution_token, early_comma
+  dq lit, 0x41, 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
@@ -4669,6 +4677,18 @@ cold_start:
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
+  ; This was "push_extrareg64".
+  dq litstring, "push-extrareg64", early_create, early_docol_codeword
+  dq litstring, "swap", early_find, entry_to_execution_token, early_comma
+  dq litstring, "rex-b", early_find, entry_to_execution_token, early_comma
+  dq litstring, "swap", early_find, entry_to_execution_token, early_comma
+  dq litstring, "extrareg64", early_find, entry_to_execution_token, early_comma
+  dq litstring, "lit", early_find, entry_to_execution_token, early_comma
+  dq lit, 0x50, early_comma
+  dq litstring, "opcodereg", 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 "pop_reg64".
   dq litstring, "pop-reg64", early_create, early_docol_codeword
   dq litstring, "reg64", early_find, entry_to_execution_token, early_comma
@@ -4678,6 +4698,19 @@ cold_start:
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
+  ; This was "pop_extrareg64".
+  dq litstring, "pop-extrareg64", early_create, early_docol_codeword
+  dq litstring, "swap", early_find, entry_to_execution_token, early_comma
+  dq litstring, "rex-b", early_find, entry_to_execution_token, early_comma
+  dq litstring, "swap", early_find, entry_to_execution_token, early_comma
+  dq litstring, "extrareg64", early_find, entry_to_execution_token
+  dq early_comma
+  dq litstring, "lit", early_find, entry_to_execution_token, early_comma
+  dq lit, 0x58, early_comma
+  dq litstring, "opcodereg", 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 push_imm32_extended64".
   dq litstring, "push-imm32-extended64", early_create, early_docol_codeword
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
@@ -9856,6 +9889,8 @@ defword conditioncode, 0
 ;   output point
 defword rex_w, 0
   dq docol, lit, 0x48, pack8, exit
+defword rex_b, 0
+  dq docol, lit, 0x41, pack8, exit
 defword rex_wb, 0
   dq docol, lit, 0x49, pack8, exit
 
@@ -10332,12 +10367,24 @@ defword push_reg64, 0
 
 ; Stack:
 ;   output point
+;   source register name
+defword push_extrareg64, 0
+  dq docol, swap, rex_b, swap, extrareg64, lit, 0x50, opcodereg, exit
+
+; Stack:
+;   output point
 ;   target register name
 defword pop_reg64, 0
   dq docol, reg64, lit, 0x58, opcodereg, exit
 
 ; Stack:
 ;   output point
+;   target register name
+defword pop_extrareg64, 0
+  dq docol, swap, rex_b, swap, extrareg64, lit, 0x58, opcodereg, exit
+
+; Stack:
+;   output point
 ;   immediate value
 defword push_imm32_extended64, 0
   dq docol, swap, lit, 0x68, pack8, swap, pack32, exit