arm64: 9999 BRK works again
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 16 Sep 2022 15:34:11 +0000 (11:34 -0400)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 16 Sep 2022 15:34:11 +0000 (11:34 -0400)
arm64-notes.txt [new file with mode: 0644]
basis/bootstrap/assembler/arm.64.factor
basis/bootstrap/stage1.factor

diff --git a/arm64-notes.txt b/arm64-notes.txt
new file mode 100644 (file)
index 0000000..319d48e
--- /dev/null
@@ -0,0 +1,20 @@
+subprimitives are arm64 bytes
+primitives are C calls
+
+
+
+CALLBACK-STUB jit-define gets called first
+set 9999 BRK to break there in lldb
+lldb ./factor
+run -i=boot.unix-arm.64.image
+
+then do c-to-factor
+
+
+rel- relocations aka fixups 
+rel-vm relocation for vm in sidetable
+
+relocation addresses are 64bit
+look at powerpc backend
+return a 64bit value in a register
+
index b77fade66c77405ecb8812044f02a9c8bf55c958..6079c7a0c9dba7498874f6f9fee9cd605f88b26a 100644 (file)
@@ -300,6 +300,9 @@ big-endian off
 ! # All arm.64 subprimitives
 {
     { c-to-factor [
+            ! Set up the datastack and retainstack registers
+            ! and jump into the quotation
+
 
             ! write()
             ! 68 X8 MOVwi64
@@ -444,6 +447,8 @@ big-endian off
 
 ! C to Factor entry point
 [
+
+    9999 BRK
     ! ! Optimizing compiler's side of callback accesses
     ! ! arguments that are on the stack via the frame pointer.
     ! ! On x86-32 fastcall, and x86-64, some arguments are passed
index 0e9c8053f4ac6d7efe3308003cf9379c9dad8778..dfb15dede723a3d785f0138174e2f1602864ebe8 100644 (file)
@@ -55,5 +55,9 @@ load-help? off
         ] if
     ] %
 ] [ ] make
+
+drop
+
+[  ]
 OBJ-STARTUP-QUOT
 bootstrap.image.private:special-objects get set-at