Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison contextSwitch.s @ 173:bfaebdf60df3
coreLoop: All written variables are now on local stack or in seperate cache line
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 20 Dec 2011 15:39:30 +0100 |
| parents | 9ddbb071142d |
| children |
comparison
equal
deleted
inserted
replaced
| 3:bbdbf025a867 | 6:8e2ed09f4581 |
|---|---|
| 29 * 0x20 nextInstrPt | 29 * 0x20 nextInstrPt |
| 30 * 0x30 coreLoopFramePtr | 30 * 0x30 coreLoopFramePtr |
| 31 * 0x38 coreLoopStackPtr | 31 * 0x38 coreLoopStackPtr |
| 32 * | 32 * |
| 33 * _VMSMasterEnv offsets: | 33 * _VMSMasterEnv offsets: |
| 34 * 0x48 coreLoopReturnPt | 34 * 0x148 coreLoopReturnPt |
| 35 * 0x54 masterLock | 35 * 0x00 masterLock |
| 36 */ | 36 */ |
| 37 .globl switchToVP | 37 .globl switchToVP |
| 38 switchToVP: | 38 switchToVP: |
| 39 #VirtProcr in %rdi | 39 #VirtProcr in %rdi |
| 40 movq %rsp , 0x38(%rdi) #save core loop stack pointer | 40 movq %rsp , 0x38(%rdi) #save core loop stack pointer |
| 54 * 0x20 nextInstrPt | 54 * 0x20 nextInstrPt |
| 55 * 0x30 coreLoopFramePtr | 55 * 0x30 coreLoopFramePtr |
| 56 * 0x38 coreLoopStackPtr | 56 * 0x38 coreLoopStackPtr |
| 57 * | 57 * |
| 58 * _VMSMasterEnv offsets: | 58 * _VMSMasterEnv offsets: |
| 59 * 0x48 coreLoopReturnPt | 59 * 0x148 coreLoopReturnPt |
| 60 * 0x54 masterLock | 60 * 0x00 masterLock |
| 61 */ | 61 */ |
| 62 .globl switchToCoreLoop | 62 .globl switchToCoreLoop |
| 63 switchToCoreLoop: | 63 switchToCoreLoop: |
| 64 #VirtProcr in %rdi | 64 #VirtProcr in %rdi |
| 65 movq $VPReturn , 0x20(%rdi) #store return address | 65 movq $VPReturn , 0x20(%rdi) #store return address |
| 67 movq %rbp , 0x18(%rdi) #save frame pointer | 67 movq %rbp , 0x18(%rdi) #save frame pointer |
| 68 movq 0x38(%rdi), %rsp #restore stack pointer | 68 movq 0x38(%rdi), %rsp #restore stack pointer |
| 69 movq 0x30(%rdi), %rbp #restore frame pointer | 69 movq 0x30(%rdi), %rbp #restore frame pointer |
| 70 movq $_VMSMasterEnv, %rcx | 70 movq $_VMSMasterEnv, %rcx |
| 71 movq (%rcx) , %rcx | 71 movq (%rcx) , %rcx |
| 72 movq 0x48(%rcx), %rax #get CoreLoopStartPt | 72 movq 0x148(%rcx), %rax #get CoreLoopStartPt |
| 73 jmp *%rax #jmp to CoreLoop | 73 jmp *%rax #jmp to CoreLoop |
| 74 VPReturn: | 74 VPReturn: |
| 75 ret | 75 ret |
| 76 | 76 |
| 77 | 77 |
| 84 * 0x20 nextInstrPt | 84 * 0x20 nextInstrPt |
| 85 * 0x30 coreLoopFramePtr | 85 * 0x30 coreLoopFramePtr |
| 86 * 0x38 coreLoopStackPtr | 86 * 0x38 coreLoopStackPtr |
| 87 * | 87 * |
| 88 * _VMSMasterEnv offsets: | 88 * _VMSMasterEnv offsets: |
| 89 * 0x48 coreLoopReturnPt | 89 * 0x148 coreLoopReturnPt |
| 90 * 0x54 masterLock | 90 * 0x00 masterLock |
| 91 */ | 91 */ |
| 92 .globl masterSwitchToCoreLoop | 92 .globl masterSwitchToCoreLoop |
| 93 masterSwitchToCoreLoop: | 93 masterSwitchToCoreLoop: |
| 94 #VirtProcr in %rdi | 94 #VirtProcr in %rdi |
| 95 movq $MasterReturn, 0x20(%rdi) #store return address | 95 movq $MasterReturn, 0x20(%rdi) #store return address |
| 97 movq %rbp , 0x18(%rdi) #save frame pointer | 97 movq %rbp , 0x18(%rdi) #save frame pointer |
| 98 movq 0x38(%rdi), %rsp #restore stack pointer | 98 movq 0x38(%rdi), %rsp #restore stack pointer |
| 99 movq 0x30(%rdi), %rbp #restore frame pointer | 99 movq 0x30(%rdi), %rbp #restore frame pointer |
| 100 movq $_VMSMasterEnv, %rcx | 100 movq $_VMSMasterEnv, %rcx |
| 101 movq (%rcx) , %rcx | 101 movq (%rcx) , %rcx |
| 102 movq 0x48(%rcx), %rax #get CoreLoopStartPt | 102 movq 0x148(%rcx), %rax #get CoreLoopStartPt |
| 103 movl $0x0 , 0x54(%rcx) #release lock | 103 movl $0x0 , 0x00(%rcx) #release lock |
| 104 jmp *%rax #jmp to CoreLoop | 104 jmp *%rax #jmp to CoreLoop |
| 105 MasterReturn: | 105 MasterReturn: |
| 106 ret | 106 ret |
| 107 | 107 |
| 108 | 108 |
