- File:
-
- 1 edited
-
libcfa/src/concurrency/CtxSwitch-i386.S (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/CtxSwitch-i386.S
rb78129a rbf71cfd 41 41 #define PC_OFFSET ( 2 * PTR_BYTE ) 42 42 43 .text43 .text 44 44 .align 2 45 .globl CtxSwitch 46 .type CtxSwitch, @function 45 .globl CtxSwitch 47 46 CtxSwitch: 48 47 … … 51 50 52 51 movl 4(%esp),%eax 52 53 // Save floating & SSE control words on the stack. 54 55 sub $8,%esp 56 stmxcsr 0(%esp) // 4 bytes 57 fnstcw 4(%esp) // 2 bytes 53 58 54 59 // Save volatile registers on the stack. … … 62 67 movl %esp,SP_OFFSET(%eax) 63 68 movl %ebp,FP_OFFSET(%eax) 69 // movl 4(%ebp),%ebx // save previous eip for debugger 70 // movl %ebx,PC_OFFSET(%eax) 64 71 65 72 // Copy the "to" context argument from the stack to register eax … … 67 74 // argument is now at 8 + 12 = 20(%esp) 68 75 69 movl 2 0(%esp),%eax76 movl 28(%esp),%eax 70 77 71 78 // Load new context from the "to" area. … … 80 87 popl %ebx 81 88 89 // Load floating & SSE control words from the stack. 90 91 fldcw 4(%esp) 92 ldmxcsr 0(%esp) 93 add $8,%esp 94 82 95 // Return to thread. 83 96 84 97 ret 85 .size CtxSwitch, .-CtxSwitch86 98 87 99 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.