Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 28:66f72d6b1e51 | 30:9d09d6178f9c |
|---|---|
| 356 //record time stamp: compare to time-stamp recorded below | 356 //record time stamp: compare to time-stamp recorded below |
| 357 saveLowTimeStampCountInto( animatingPr->preSuspTSCLow ); | 357 saveLowTimeStampCountInto( animatingPr->preSuspTSCLow ); |
| 358 #endif | 358 #endif |
| 359 //======================================================================= | 359 //======================================================================= |
| 360 | 360 |
| 361 | 361 /* VirtProcr offsets: |
| 362 SwitchToCoreLoop( animatingPr ) | 362 * 0xc stackPtr |
| 363 * 0x10 framePtr | |
| 364 * 0x14 nextInstrPt | |
| 365 * 0x1c coreLoopFramePtr | |
| 366 * 0x20 coreLoopStackPtr | |
| 367 * | |
| 368 * _VMSMasterEnv offsets: | |
| 369 * 0x24 coreLoopStartPt | |
| 370 * 0x28 coreLoopEndPt | |
| 371 * 0x30 masterLock | |
| 372 */ | |
| 373 // SwitchToCoreLoop( animatingPr ) | |
| 374 asm volatile("movl %0, %%ebx; \ | |
| 375 movl %1, %%ecx; \ | |
| 376 movl %%esp, 0x0c(%%ecx); \ | |
| 377 movl %%ebp, 0x10(%%ecx); \ | |
| 378 movl 0x24(%%ebx), %%eax; \ | |
| 379 movl 0x20(%%ecx), %%esp; \ | |
| 380 movl 0x1c(%%ecx), %%ebp; \ | |
| 381 jmp %%eax" \ | |
| 382 /* outputs */ : \ | |
| 383 /* inputs */ : "g"(_VMSMasterEnv), "g"(animatingPr) \ | |
| 384 /* clobber */ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi" \ | |
| 385 ); | |
| 386 | |
| 387 // asm volatile("mov %0,%%ebx; \ | |
| 388 mov %%ebx, %%eax; \ | |
| 389 add $0xc, %%eax; \ | |
| 390 movl %%esp, (%%eax); \ | |
| 391 mov %%ebx, %%eax; \ | |
| 392 add $0x10, %%eax; \ | |
| 393 movl %%ebp, (%%eax); \ | |
| 394 movl %1, %%eax; \ | |
| 395 movl %2, %%esp; \ | |
| 396 movl %3, %%ebp; \ | |
| 397 jmp %%eax" \ | |
| 398 /* outputs */ : \ | |
| 399 /* inputs */ : "g"(animatingPr), "g" (jmpPt), "g" (coreLoopStackPtr), \ | |
| 400 "g" (coreLoopFramePtr) \ | |
| 401 /* clobber */ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi" \ | |
| 402 ); | |
| 363 | 403 |
| 364 //======================================================================= | 404 //======================================================================= |
| 365 ResumePt: | 405 ResumePt: |
| 366 #ifdef MEAS__TIME_STAMP_SUSP | 406 #ifdef MEAS__TIME_STAMP_SUSP |
| 367 //NOTE: only take low part of count -- do sanity check when take diff | 407 //NOTE: only take low part of count -- do sanity check when take diff |
