Add some more mod files.
authorblitz-research <blitzmunter@gamil.com>
Thu, 23 Jan 2014 00:00:26 +0000 (13:00 +1300)
committerblitz-research <blitzmunter@gamil.com>
Thu, 23 Jan 2014 00:00:26 +0000 (13:00 +1300)
mod/brl.mod/blitz.mod/blitz_gc.linux.x86.s [new file with mode: 0644]
mod/brl.mod/blitz.mod/blitz_gc.macos.x86.s [new file with mode: 0644]
mod/brl.mod/blitz.mod/blitz_gc.win32.x86.s [new file with mode: 0644]

diff --git a/mod/brl.mod/blitz.mod/blitz_gc.linux.x86.s b/mod/brl.mod/blitz.mod/blitz_gc.linux.x86.s
new file mode 100644 (file)
index 0000000..392548d
--- /dev/null
@@ -0,0 +1,18 @@
+
+       format  ELF
+
+       public  bbGCRootRegs
+       
+       section "code"
+
+       ;0[esp]=ret
+       ;4[esp]=buf
+bbGCRootRegs:
+       mov             eax,[esp+4]
+       mov             [eax],ebx
+       mov             [eax+4],esi
+       mov             [eax+8],edi
+       mov             [eax+12],ebp
+       mov             eax,esp
+       add             eax,8
+       ret
diff --git a/mod/brl.mod/blitz.mod/blitz_gc.macos.x86.s b/mod/brl.mod/blitz.mod/blitz_gc.macos.x86.s
new file mode 100644 (file)
index 0000000..b5a72f1
--- /dev/null
@@ -0,0 +1,14 @@
+
+       .globl          _bbGCRootRegs
+
+       .text
+
+_bbGCRootRegs:
+       mov             4(%esp),%eax
+       mov             %ebx,(%eax)
+       mov             %esi,4(%eax)
+       mov             %edi,8(%eax)
+       mov             %ebp,12(%eax)
+       mov             %esp,%eax
+       add             $8,%eax
+       ret
diff --git a/mod/brl.mod/blitz.mod/blitz_gc.win32.x86.s b/mod/brl.mod/blitz.mod/blitz_gc.win32.x86.s
new file mode 100644 (file)
index 0000000..bc31d62
--- /dev/null
@@ -0,0 +1,37 @@
+
+       ;Note:
+       ;
+       ;The bbGCEnter/bbGCLeave stuff below is for the Win32 only dll hack.
+       ;
+       ;Need a much nicer way to manage dlls...
+       ;
+       format  MS COFF
+
+       public  _bbGCEnter
+       public  _bbGCLeave
+       public  _bbGCRootRegs
+       
+       extrn   _bbGCStackTop
+       
+       section "code" code
+       
+_bbGCEnter:
+       mov             [_bbGCStackTop],ebp
+       ret
+       
+_bbGCLeave:
+       mov             dword [_bbGCStackTop],0
+       ret
+
+       ;0[esp]=ret
+       ;4[esp]=buf
+_bbGCRootRegs:
+       mov             eax,[esp+4]
+       mov             [eax],ebx
+       mov             [eax+4],esi
+       mov             [eax+8],edi
+       mov             [eax+12],ebp
+       mov             eax,esp
+       add             eax,8
+       ret
+