# HG changeset patch # User Me # Date 1289919632 -3600 # Node ID 2377967a27327fe79d955e1880cfaea5a72a9d8b # Parent 13b22ffb8a2f405b55c1ae8e50fc2d3b98d7049e Fixed sequential coreLoop, where switchVPs was broken diff -r 13b22ffb8a2f -r 2377967a2732 CoreLoop.c --- a/CoreLoop.c Sun Nov 14 11:17:52 2010 -0800 +++ b/CoreLoop.c Tue Nov 16 16:00:32 2010 +0100 @@ -158,30 +158,9 @@ //===================================================================== } -/* VirtProcr offsets: - * 0xc stackPtr - * 0x10 framePtr - * 0x14 nextInstrPt - * 0x1c coreLoopFramePtr - * 0x20 coreLoopStackPtr - * - * _VMSMasterEnv offsets: - * 0x24 coreLoopStartPt - * 0x28 coreLoopEndPt - * 0x30 masterLock - */ -// SwitchToVP( currPr ) - asm volatile("movl %0, %%ebx; \ - movl %%esp, 0x20(%%ebx); \ - movl %%ebp, 0x1c(%%ebx); \ - movl 0x14(%%ebx), %%eax; \ - movl 0x0c(%%ebx), %%esp; \ - movl 0x10(%%ebx), %%ebp; \ - jmp *%%eax" \ - /* outputs */ : \ - /* inputs */ : "g"(currPr) \ - /* clobber */ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi" \ - ); + + + SwitchToVP( currPr ) //=========== jmp to here when want to shut down the VMS system ========== diff -r 13b22ffb8a2f -r 2377967a2732 SwitchAnimators.h --- a/SwitchAnimators.h Sun Nov 14 11:17:52 2010 -0800 +++ b/SwitchAnimators.h Tue Nov 16 16:00:32 2010 +0100 @@ -185,9 +185,32 @@ //switch to virt procr's stack and frame ptr then jump to virt procr fn +/* VirtProcr offsets: + * 0xc stackPtr + * 0x10 framePtr + * 0x14 nextInstrPt + * 0x1c coreLoopFramePtr + * 0x20 coreLoopStackPtr + * + * _VMSMasterEnv offsets: + * 0x24 coreLoopStartPt + * 0x28 coreLoopEndPt + * 0x30 masterLock + */ +#define SwitchToVP( currPr ) \ + asm volatile("movl %0, %%ebx; \ + movl %%esp, 0x20(%%ebx); \ + movl %%ebp, 0x1c(%%ebx); \ + movl 0x14(%%ebx), %%eax; \ + movl 0x0c(%%ebx), %%esp; \ + movl 0x10(%%ebx), %%ebp; \ + jmp *%%eax" \ + /* outputs */ : \ + /* inputs */ : "g"(currPr) \ + /* clobber */ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi" \ + ); -#define SwitchToVP( currPr ) \ - void *stackPtr, *framePtr, *jmpPt; \ +// void *stackPtr, *framePtr, *jmpPt; \ \ stackPtr = currPr->stackPtr; \ framePtr = currPr->framePtr; \ diff -r 13b22ffb8a2f -r 2377967a2732 VMS.h --- a/VMS.h Sun Nov 14 11:17:52 2010 -0800 +++ b/VMS.h Tue Nov 16 16:00:32 2010 +0100 @@ -63,8 +63,8 @@ // rollover of low portion into high portion. //#define MEAS__TIME_STAMP_SUSP //#define MEAS__TIME_MASTER -//#define MEAS__TIME_PLUGIN -//#define MEAS__TIME_MALLOC +#define MEAS__TIME_PLUGIN +#define MEAS__TIME_MALLOC #define MEAS__TIME_MASTER_LOCK #define MEAS__NUM_TIMES_TO_RUN 100000