Rev 1 | Rev 48 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 46 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | .text |
29 | .text |
30 | 30 | ||
31 | .global context_save |
31 | .global context_save |
32 | .global context_restore |
32 | .global context_restore |
33 | 33 | ||
- | 34 | ||
34 | # |
35 | # |
35 | # save context of this CPU |
36 | # save context of this CPU |
36 | context_save: |
37 | context_save: |
37 | push %ebx |
38 | push %ebx |
38 | 39 | ||
Line 71... | Line 72... | ||
71 | 72 | ||
72 | movl 4(%eax),%eax |
73 | movl 4(%eax),%eax |
73 | movl %eax,(%esp) # ctx->pc -> saver's return %eip |
74 | movl %eax,(%esp) # ctx->pc -> saver's return %eip |
74 | xorl %eax,%eax # context_restore returns 0 |
75 | xorl %eax,%eax # context_restore returns 0 |
75 | ret |
76 | ret |
- | 77 | ||
- | 78 | ||
- | 79 | .global fpu_context_save |
|
- | 80 | fpu_context_save: |
|
- | 81 | ret |
|
- | 82 | .global fpu_context_restore |
|
- | 83 | fpu_context_restore: |
|
- | 84 | ret |
|
- | 85 | ||
- | 86 | .global fpu_lazy_context_save |
|
- | 87 | mov 4(%esp),%eax; |
|
- | 88 | fxsave (%eax) |
|
- | 89 | xor %eax,%eax; |
|
- | 90 | ret; |
|
- | 91 | .global fpu_lazy_context_restore |
|
- | 92 | mov 4(%esp),%eax; |
|
- | 93 | fxrstor (%eax) |
|
- | 94 | xor %eax,%eax; |
|
- | 95 | ret; |
|
- | 96 |