Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff contextSwitch.s @ 132:dbfc8382d546
distributed memory allocation interface - unfinished
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Fri, 16 Sep 2011 14:25:49 +0200 |
| parents | 9ddbb071142d |
| children | 99343ffe1918 |
line diff
1.1 --- a/contextSwitch.s Wed Sep 07 17:45:05 2011 +0200 1.2 +++ b/contextSwitch.s Fri Sep 16 14:25:49 2011 +0200 1.3 @@ -2,7 +2,17 @@ 1.4 1.5 1.6 .text 1.7 - 1.8 +/* VirtProcr offsets: 1.9 + * 0x10 stackPtr 1.10 + * 0x18 framePtr 1.11 + * 0x20 nextInstrPt 1.12 + * 0x30 coreLoopFramePtr 1.13 + * 0x38 coreLoopStackPtr 1.14 + * 1.15 + * _VMSMasterEnv offsets: 1.16 + * 0x38 coreLoopReturnPt 1.17 + * 0x44 masterLock 1.18 + */ 1.19 //Save return label address for the coreLoop to pointer 1.20 //Arguments: Pointer to variable holding address 1.21 .globl saveCoreLoopReturnAddr 1.22 @@ -23,17 +33,6 @@ 1.23 1.24 //Switches form CoreLoop to VP ether a normal VP or the Master Loop 1.25 //switch to virt procr's stack and frame ptr then jump to virt procr fn 1.26 -/* VirtProcr offsets: 1.27 - * 0x10 stackPtr 1.28 - * 0x18 framePtr 1.29 - * 0x20 nextInstrPt 1.30 - * 0x30 coreLoopFramePtr 1.31 - * 0x38 coreLoopStackPtr 1.32 - * 1.33 - * _VMSMasterEnv offsets: 1.34 - * 0x48 coreLoopReturnPt 1.35 - * 0x54 masterLock 1.36 - */ 1.37 .globl switchToVP 1.38 switchToVP: 1.39 #VirtProcr in %rdi 1.40 @@ -48,17 +47,6 @@ 1.41 1.42 1.43 //switches to core loop. saves return address 1.44 -/* VirtProcr offsets: 1.45 - * 0x10 stackPtr 1.46 - * 0x18 framePtr 1.47 - * 0x20 nextInstrPt 1.48 - * 0x30 coreLoopFramePtr 1.49 - * 0x38 coreLoopStackPtr 1.50 - * 1.51 - * _VMSMasterEnv offsets: 1.52 - * 0x48 coreLoopReturnPt 1.53 - * 0x54 masterLock 1.54 - */ 1.55 .globl switchToCoreLoop 1.56 switchToCoreLoop: 1.57 #VirtProcr in %rdi 1.58 @@ -69,7 +57,7 @@ 1.59 movq 0x30(%rdi), %rbp #restore frame pointer 1.60 movq $_VMSMasterEnv, %rcx 1.61 movq (%rcx) , %rcx 1.62 - movq 0x48(%rcx), %rax #get CoreLoopStartPt 1.63 + movq 0x38(%rcx), %rax #get CoreLoopStartPt 1.64 jmp *%rax #jmp to CoreLoop 1.65 VPReturn: 1.66 ret 1.67 @@ -78,17 +66,6 @@ 1.68 1.69 //switches to core loop from master. saves return address 1.70 //Releases masterLock so the next MasterLoop can be executed 1.71 -/* VirtProcr offsets: 1.72 - * 0x10 stackPtr 1.73 - * 0x18 framePtr 1.74 - * 0x20 nextInstrPt 1.75 - * 0x30 coreLoopFramePtr 1.76 - * 0x38 coreLoopStackPtr 1.77 - * 1.78 - * _VMSMasterEnv offsets: 1.79 - * 0x48 coreLoopReturnPt 1.80 - * 0x54 masterLock 1.81 - */ 1.82 .globl masterSwitchToCoreLoop 1.83 masterSwitchToCoreLoop: 1.84 #VirtProcr in %rdi 1.85 @@ -99,8 +76,8 @@ 1.86 movq 0x30(%rdi), %rbp #restore frame pointer 1.87 movq $_VMSMasterEnv, %rcx 1.88 movq (%rcx) , %rcx 1.89 - movq 0x48(%rcx), %rax #get CoreLoopStartPt 1.90 - movl $0x0 , 0x54(%rcx) #release lock 1.91 + movq 0x38(%rcx), %rax #get CoreLoopStartPt 1.92 + movl $0x0 , 0x44(%rcx) #release lock 1.93 jmp *%rax #jmp to CoreLoop 1.94 MasterReturn: 1.95 ret 1.96 @@ -112,17 +89,6 @@ 1.97 // and virtPr is in %rdi 1.98 // and both functions have the same argument. 1.99 // do not save register of VP because this function will never return 1.100 -/* VirtProcr offsets: 1.101 - * 0x10 stackPtr 1.102 - * 0x18 framePtr 1.103 - * 0x20 nextInstrPt 1.104 - * 0x30 coreLoopFramePtr 1.105 - * 0x38 coreLoopStackPtr 1.106 - * 1.107 - * _VMSMasterEnv offsets: 1.108 - * 0x48 coreLoopReturnPt 1.109 - * 0x58 masterLock 1.110 - */ 1.111 .globl asmTerminateCoreLoop 1.112 asmTerminateCoreLoop: 1.113 #VirtProcr in %rdi
