Changeset af22f158 in mainline
- Timestamp:
- 2005-05-19T20:29:08Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c01bd280
- Parents:
- bc4a49f
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/Makefile.inc
rbc4a49f raf22f158 14 14 15 15 CPPFLAGS=$(DEFS) -nostdinc -I../include 16 CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fomit-frame-pointer -Wmissing-prototypes -Werror -O 316 CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fomit-frame-pointer -Wmissing-prototypes -Werror -O0 17 17 LFLAGS=-M -no-check-sections -T ../arch/ia32/_link.ld 18 18 -
arch/ia32/src/cpu/cpu.c
rbc4a49f raf22f158 132 132 CPU->arch.stepping = (info.cpuid_eax>>0)&0xf; 133 133 } 134 set_TS_flag(); 134 135 } 135 136 -
arch/ia32/src/fpu_context.c
rbc4a49f raf22f158 52 52 void fpu_lazy_context_save(fpu_context_t *fctx) 53 53 { 54 printf(""); 55 asm( 56 "mov %0,%%eax;" 57 "fxsave (%%eax);" 58 :"=m"(fctx) 59 : 60 :"eax" 61 ); 62 printf(""); 54 asm 55 ( 56 "push %%eax;" 57 "mov 0x8(%%esp),%%eax;" 58 "fnsave (%%eax);" 59 "pop %%eax;" 60 :"=m"(fctx) 61 : 62 :"eax" 63 ); 63 64 } 64 65 65 66 void fpu_lazy_context_restore(fpu_context_t *fctx) 66 67 { 67 printf(""); 68 asm( 69 "mov %0,%%eax;" 70 "fxrstor (%%eax);" 71 :"=m"(fctx) 72 : 73 :"eax" 74 ); 75 printf(""); 68 asm 69 ( 70 "push %%eax;" 71 "mov 0x8(%%esp),%%eax;" 72 "frstor (%%eax);" 73 "pop %%eax;" 74 :"=m"(fctx) 75 : 76 :"eax" 77 ); 76 78 } 77 79 -
arch/ia32/src/interrupt.c
rbc4a49f raf22f158 102 102 if ((CPU->fpu_owner)!=NULL) 103 103 { 104 // printf("owner %X\n",(int)(&((CPU->fpu_owner)->saved_fpu_context))); 104 // printf("tid:%d \n", THREAD->tid); 105 // printf("owner:%d\n", (CPU->fpu_owner)->tid); 105 106 fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context)); 106 107 -
test/fpu/fpu0/test.c
rbc4a49f raf22f158 45 45 { 46 46 int i; 47 while(1) { 47 while(1) 48 { 48 49 double e,d,le,f; 49 50 le=-1; 50 51 e=0; 51 52 f=1; 52 for(i=0,d=1;e!=le;d*=f,f+=1,i++) { 53 for(i=0,d=1;e!=le;d*=f,f+=1,i++) 54 { 53 55 le=e; 54 56 e=e+1/d; 55 if (i>1000000) { 56 printf("tid%d: e LOOPING\n", THREAD->tid); 57 if (i>20000000) 58 { 59 // printf("tid%d: e LOOPING\n", THREAD->tid); 60 putchar('!'); 57 61 i = 0; 58 62 } 63 59 64 } 60 65 … … 75 80 thread_ready(t); 76 81 } 82 83 while(1); 77 84 78 85 }
Note:
See TracChangeset
for help on using the changeset viewer.