@@ -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
@@ -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
@@ -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
+_bbGCLeave:
+ mov dword [_bbGCStackTop],0