Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 85 → Rev 90

/SPARTAN/trunk/arch/ia32/Makefile.inc
13,7 → 13,7
endif
 
CPPFLAGS=$(DEFS) -nostdinc -I../include
CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fomit-frame-pointer -Wmissing-prototypes -Werror -O3
CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fomit-frame-pointer -Wmissing-prototypes -Werror -O0
LFLAGS=-M -no-check-sections -T ../arch/ia32/_link.ld
 
arch_sources= \
/SPARTAN/trunk/arch/ia32/src/fpu_context.c
51,28 → 51,30
 
void fpu_lazy_context_save(fpu_context_t *fctx)
{
printf("");
asm(
"mov %0,%%eax;"
"fxsave (%%eax);"
:"=m"(fctx)
:
:"eax"
);
printf("");
asm
(
"push %%eax;"
"mov 0x8(%%esp),%%eax;"
"fnsave (%%eax);"
"pop %%eax;"
:"=m"(fctx)
:
:"eax"
);
}
 
void fpu_lazy_context_restore(fpu_context_t *fctx)
{
printf("");
asm(
"mov %0,%%eax;"
"fxrstor (%%eax);"
:"=m"(fctx)
:
:"eax"
);
printf("");
asm
(
"push %%eax;"
"mov 0x8(%%esp),%%eax;"
"frstor (%%eax);"
"pop %%eax;"
:"=m"(fctx)
:
:"eax"
);
}
 
void fpu_init(void)
/SPARTAN/trunk/arch/ia32/src/cpu/cpu.c
131,6 → 131,7
CPU->arch.model = (info.cpuid_eax>>4)&0xf;
CPU->arch.stepping = (info.cpuid_eax>>0)&0xf;
}
set_TS_flag();
}
 
void cpu_print_report(cpu_t* m)
/SPARTAN/trunk/arch/ia32/src/interrupt.c
101,7 → 101,8
reset_TS_flag();
if ((CPU->fpu_owner)!=NULL)
{
// printf("owner %X\n",(int)(&((CPU->fpu_owner)->saved_fpu_context)));
// printf("tid:%d \n", THREAD->tid);
// printf("owner:%d\n", (CPU->fpu_owner)->tid);
fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context));
 
// printf("owner 2\n");