Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff VMS.c @ 62:dd3e60aeae26
Middle of fixing for -O3.. works -O0 still -- hard-code field offsets in assbly
| author | Me |
|---|---|
| date | Fri, 12 Nov 2010 07:36:01 -0800 |
| parents | 26d53313a8f2 |
| children | a6c442d52590 5cb919ac890f |
line diff
1.1 --- a/VMS.c Mon Nov 08 03:57:46 2010 -0800 1.2 +++ b/VMS.c Fri Nov 12 07:36:01 2010 -0800 1.3 @@ -358,8 +358,48 @@ 1.4 #endif 1.5 //======================================================================= 1.6 1.7 +/* VirtProcr offsets: 1.8 + * 0xc stackPtr 1.9 + * 0x10 framePtr 1.10 + * 0x14 nextInstrPt 1.11 + * 0x1c coreLoopFramePtr 1.12 + * 0x20 coreLoopStackPtr 1.13 + * 1.14 + * _VMSMasterEnv offsets: 1.15 + * 0x24 coreLoopStartPt 1.16 + * 0x28 coreLoopEndPt 1.17 + * 0x30 masterLock 1.18 + */ 1.19 +// SwitchToCoreLoop( animatingPr ) 1.20 + asm volatile("movl %0, %%ebx; \ 1.21 + movl %1, %%ecx; \ 1.22 + movl %%esp, 0x0c(%%ecx); \ 1.23 + movl %%ebp, 0x10(%%ecx); \ 1.24 + movl 0x24(%%ebx), %%eax; \ 1.25 + movl 0x20(%%ecx), %%esp; \ 1.26 + movl 0x1c(%%ecx), %%ebp; \ 1.27 + jmp %%eax" \ 1.28 + /* outputs */ : \ 1.29 + /* inputs */ : "g"(_VMSMasterEnv), "g"(animatingPr) \ 1.30 + /* clobber */ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi" \ 1.31 + ); 1.32 1.33 - SwitchToCoreLoop( animatingPr ) 1.34 +// asm volatile("mov %0,%%ebx; \ 1.35 + mov %%ebx, %%eax; \ 1.36 + add $0xc, %%eax; \ 1.37 + movl %%esp, (%%eax); \ 1.38 + mov %%ebx, %%eax; \ 1.39 + add $0x10, %%eax; \ 1.40 + movl %%ebp, (%%eax); \ 1.41 + movl %1, %%eax; \ 1.42 + movl %2, %%esp; \ 1.43 + movl %3, %%ebp; \ 1.44 + jmp %%eax" \ 1.45 + /* outputs */ : \ 1.46 + /* inputs */ : "g"(animatingPr), "g" (jmpPt), "g" (coreLoopStackPtr), \ 1.47 + "g" (coreLoopFramePtr) \ 1.48 + /* clobber */ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi" \ 1.49 + ); 1.50 1.51 //======================================================================= 1.52 ResumePt:
