[svn r259] Enabled ASM for the GC, this closes #45 by saving the registers on the stack.

This commit is contained in:
Tomas Lindquist Olsen
2008-06-09 02:05:02 +02:00
parent d939ce7ef6
commit 951657ccdc
3 changed files with 24 additions and 4 deletions

View File

@@ -783,6 +783,7 @@ tangotests/r.d
tangotests/s.d
tangotests/stdout1.d
tangotests/stdout2.d
tangotests/sync1.d
tangotests/t.d
tangotests/templ1.d
tangotests/vararg1.d

View File

@@ -2058,8 +2058,27 @@ struct Gcx
size_t result;
version(LLVMDC)
{
// TODO & BUG:
// should make sure registers are on the stack, maybe some external asm ?
// put registers on the stack
version(D_InlineAsm_X86)
{
uint _eax, _ecx, _edx, _ebx, _esp, _ebp, _esi, _edi;
asm
{
mov _eax, EAX;
mov _ecx, ECX;
mov _edx, EDX;
mov _ebx, EBX;
mov _esp, ESP;
mov _ebp, EBP;
mov _esi, ESI;
mov _edi, EDI;
mov sp, ESP;
}
}
else
{
// FIXME
}
}
else version (GNU)
{

View File

@@ -24,10 +24,10 @@ ADD_DFLAGS=
CFLAGS=-g $(ADD_CFLAGS)
#DFLAGS=-release -O3 -inline -w -nofloat $(ADD_DFLAGS)
DFLAGS=-g -w -nofloat -noasm $(ADD_DFLAGS)
DFLAGS=-g -w -nofloat $(ADD_DFLAGS)
#TFLAGS=-O3 -inline -w -nofloat $(ADD_DFLAGS)
TFLAGS=-g -w -nofloat -noasm $(ADD_DFLAGS)
TFLAGS=-g -w -nofloat $(ADD_DFLAGS)
DOCFLAGS=-version=DDoc