Changeset 342616d in mainline
- Timestamp:
- 2005-09-05T11:27:12Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ff4c4f5
- Parents:
- 8fe379b5
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/fpu_context.c
r8fe379b5 r342616d 40 40 if(THREAD==CPU->fpu_owner) 41 41 reset_TS_flag(); 42 else {42 else 43 43 set_TS_flag(); 44 if (CPU->fpu_owner != NULL)45 CPU->fpu_owner->fpu_context_engaged=1;46 }47 44 } 48 45 -
arch/amd64/src/interrupt.c
r8fe379b5 r342616d 135 135 } 136 136 CPU->fpu_owner=THREAD; 137 THREAD->fpu_context_engaged = 1; 137 138 } 138 139 -
test/fpu/sse1/test.c
r8fe379b5 r342616d 45 45 static waitq_t can_start; 46 46 47 static void testit (void *data)47 static void testit1(void *data) 48 48 { 49 49 int i; … … 75 75 } 76 76 77 static void testit2(void *data) 78 { 79 int i; 80 volatile long long j; 81 double e,d,le,f; 82 int arg __attribute__((aligned(16))) = (int)((__native) data); 83 int after_arg __attribute__((aligned(16))); 84 85 waitq_sleep(&can_start); 86 87 for (i = 0; i<ATTEMPTS; i++) { 88 __asm__ volatile ( 89 "movlpd %0, %%xmm2" 90 :"=m"(arg) 91 ); 92 93 scheduler(); 94 __asm__ volatile ( 95 "movlpd %%xmm2, %0" 96 :"=m"(after_arg) 97 ); 98 99 if(arg != after_arg) 100 panic("tid%d: arg(%d) != %d\n", 101 THREAD->tid, arg, after_arg); 102 } 103 104 atomic_inc(&threads_ok); 105 } 106 77 107 78 108 void test(void) … … 86 116 printf("Creating %d threads... ", THREADS); 87 117 88 for (i=0; i<THREADS; i++) { 89 if (!(t = thread_create(testit, (void *)((__native)i), TASK, 0))) 118 for (i=0; i<THREADS/2; i++) { 119 if (!(t = thread_create(testit1, (void *)((__native)i*2), TASK, 0))) 120 panic("could not create thread\n"); 121 thread_ready(t); 122 if (!(t = thread_create(testit2, (void *)((__native)i*2+1), TASK, 0))) 90 123 panic("could not create thread\n"); 91 124 thread_ready(t); 92 125 } 126 93 127 printf("ok\n"); 94 128
Note:
See TracChangeset
for help on using the changeset viewer.