summary refs log tree commit diff
path: root/to-consider.e
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-05-17 17:29:09 -0700
committerIrene Knapp <ireneista@irenes.space>2026-05-17 17:29:09 -0700
commit3b41dbfa2338c11dd8398026c00922f20f32dc81 (patch)
tree1761f2b8f2da972b830cf617d194c7c5be5b1535 /to-consider.e
parent4f1a07da9c87a1560da34b8a96a9de4cdc90f1fc (diff)
implement log-load-create; add all the pack/unpack stuff to core.e
Force-Push: yes
Change-Id: I04dd65a9eec71f9b50c8875bdcbe5d4be59888d5
Diffstat (limited to 'to-consider.e')
-rw-r--r--to-consider.e38
1 files changed, 38 insertions, 0 deletions
diff --git a/to-consider.e b/to-consider.e
new file mode 100644
index 0000000..109464b
--- /dev/null
+++ b/to-consider.e
@@ -0,0 +1,38 @@
+~   This file is for stuff that should probably be deleted after flatassembler
+~ is removed, but is being kept here temporarily so that those decisions can
+~ be made in an organized fashion.
+
+
+~   In the interests of reducing our executable's size, since a lot of it goes
+~ to pack* invocations, we define words that combine lit with pack*. This
+~ shaves roughly 700 bytes as of when it was added.
+~
+~ TODO are these really used anymore? also, they're the only thing beforenext
+~ is used for. note that they can't go in core.e because ' is not compatible
+~ with the label transform.
+~
+~ (output point, value -- output point)
+: litpack64
+  [ here @
+    lods64
+    :rax push-reg64
+    ' pack64 entry-to-execution-token pack-beforenext
+    here ! ] ;asm
+: litpack32
+  [ here @
+    lods64
+    :rax push-reg64
+    ' pack32 entry-to-execution-token pack-beforenext
+    here ! ] ;asm
+: litpack16
+  [ here @
+    lods64
+    :rax push-reg64
+    ' pack16 entry-to-execution-token pack-beforenext
+    here ! ] ;asm
+: litpack8
+  [ here @
+    lods64
+    :rax push-reg64
+    ' pack8 entry-to-execution-token pack-beforenext
+    here ! ] ;asm