From f3a7f50ec3086d15482eee5370deeb989e0bd820 Mon Sep 17 00:00:00 2001 From: blitz-research Date: Thu, 23 Jan 2014 13:00:26 +1300 Subject: [PATCH] Add some more mod files. --- mod/brl.mod/blitz.mod/blitz_gc.linux.x86.s | 18 +++++++++++ mod/brl.mod/blitz.mod/blitz_gc.macos.x86.s | 14 ++++++++ mod/brl.mod/blitz.mod/blitz_gc.win32.x86.s | 37 ++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 mod/brl.mod/blitz.mod/blitz_gc.linux.x86.s create mode 100644 mod/brl.mod/blitz.mod/blitz_gc.macos.x86.s create mode 100644 mod/brl.mod/blitz.mod/blitz_gc.win32.x86.s 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 index 0000000..392548d --- /dev/null +++ b/mod/brl.mod/blitz.mod/blitz_gc.linux.x86.s @@ -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 index 0000000..b5a72f1 --- /dev/null +++ b/mod/brl.mod/blitz.mod/blitz_gc.macos.x86.s @@ -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 index 0000000..bc31d62 --- /dev/null +++ b/mod/brl.mod/blitz.mod/blitz_gc.win32.x86.s @@ -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 + -- 2.30.2