aboutsummaryrefslogtreecommitdiff
path: root/todo.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-11-04 06:40:56 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-11-04 06:40:56 +0000
commita3d8e5ee1f430bb07e467247ee0b5f188fffd94c (patch)
tree1f49648a156f3782efe947edccca3379f8be55c3 /todo.org
parent262a271f4267fb06674c7b16c00dc0d233f4e831 (diff)
downloadovm-a3d8e5ee1f430bb07e467247ee0b5f188fffd94c.tar.gz
ovm-a3d8e5ee1f430bb07e467247ee0b5f188fffd94c.tar.bz2
ovm-a3d8e5ee1f430bb07e467247ee0b5f188fffd94c.zip
Added TODO for inlining labels
Diffstat (limited to 'todo.org')
-rw-r--r--todo.org31
1 files changed, 31 insertions, 0 deletions
diff --git a/todo.org b/todo.org
index ea46fc5..c67f27d 100644
--- a/todo.org
+++ b/todo.org
@@ -35,6 +35,37 @@ Something to consider is /static/ and /dynamic/ "linking" i.e.:
+ 63 bit references user code (not a lot of loss in precision)
+ Easy to check if a reference is a library reference or a user
code reference by checking "sign bit" (negativity)
+* TODO Inlining subroutines :ASM:
+Essentially consider the following situation
+#+begin_src asm
+ global _start
+a:
+ push.word 1
+ push.word 1
+ plus.word
+ print.word
+ ret
+_start:
+ call a
+ halt
+#+end_src
+What I'd like to be able to do is:
+#+begin_src asm
+ global _start
+%inline:a:
+ push.word 1
+ push.word 1
+ plus.word
+ print.word
+ ret
+%end
+_start:
+ %inline a
+ halt
+#+end_src
+This is equivalent in LOC, but in terms of the actually output
+instructions the second is smaller in size, doesn't use any jumps nor
+does it use the call stack. As a result it's a linear program.
* Completed
** DONE Write a label/jump system :ASM:
Essentially a user should be able to write arbitrary labels (maybe