Rev 2128 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2128 | Rev 2465 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | # |
1 | # |
2 | # Copyright (c) 2003-2004 Jakub Jermar |
2 | # Copyright (c) 2007 Petr Stepan |
3 | # All rights reserved. |
3 | # All rights reserved. |
4 | # |
4 | # |
5 | # Redistribution and use in source and binary forms, with or without |
5 | # Redistribution and use in source and binary forms, with or without |
6 | # modification, are permitted provided that the following conditions |
6 | # modification, are permitted provided that the following conditions |
7 | # are met: |
7 | # are met: |
Line 30... | Line 30... | ||
30 | 30 | ||
31 | .global context_save_arch |
31 | .global context_save_arch |
32 | .global context_restore_arch |
32 | .global context_restore_arch |
33 | 33 | ||
34 | context_save_arch: |
34 | context_save_arch: |
- | 35 | stmfd sp!, {r1} |
|
- | 36 | mrs r1, cpsr |
|
- | 37 | and r1, r1, #0x1f |
|
- | 38 | stmia r0!, {r1} |
|
- | 39 | ldmfd sp!, {r1} |
|
- | 40 | ||
- | 41 | stmia r0!, {sp, lr} |
|
- | 42 | stmia r0!, {r4-r11} |
|
- | 43 | ||
35 | /* TODO */ |
44 | mov r0, #1 |
- | 45 | mov pc, lr |
|
- | 46 | ||
36 | 47 | ||
37 | context_restore_arch: |
48 | context_restore_arch: |
- | 49 | ldmia r0!, {r4} |
|
- | 50 | mrs r5, cpsr |
|
- | 51 | bic r5, r5, #0x1f |
|
- | 52 | orr r5, r5, r4 |
|
- | 53 | msr cpsr_c, r5 |
|
- | 54 | ||
- | 55 | ldmia r0!, {sp, lr} |
|
- | 56 | ldmia r0!, {r4-r11} |
|
- | 57 | ||
38 | /* TODO */ |
58 | mov r0, #0 |
- | 59 | mov pc, lr |