Changeset 58fe85a for libcfa/src/concurrency/CtxSwitch-arm32.S
- Timestamp:
- Jan 7, 2021, 3:27:00 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2b4daf2, 64aeca0
- Parents:
- 3c64c668 (diff), eef8dfb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/CtxSwitch-arm32.S
r3c64c668 r58fe85a 1 @32 bit ARM context switch2 @This function assumes that r9 has no special meaning on the platform it's3 @being built on.4 @If r9 is special, uncomment the following line and it will be left alone1 # 32 bit ARM context switch 2 # This function assumes that r9 has no special meaning on the platform it's 3 # being built on. 4 # If r9 is special, uncomment the following line and it will be left alone 5 5 6 @#define R9_SPECIAL6 # #define R9_SPECIAL 7 7 8 8 #define PTR_BYTE 4 … … 17 17 18 18 __cfactx_switch: 19 @save callee-saved registers: r4-r8, r10, r11, r13(sp) (plus r9 depending on platform specification)20 @I've seen reference to 31 registers on 64-bit, if this is the case, more need to be saved21 @save thread state registers: r14(lr)22 @r12(ip) is intra-procedure-call scratch register, does not need saving between function calls19 # save callee-saved registers: r4-r8, r10, r11, r13(sp) (plus r9 depending on platform specification) 20 # I've seen reference to 31 registers on 64-bit, if this is the case, more need to be saved 21 # save thread state registers: r14(lr) 22 # r12(ip) is intra-procedure-call scratch register, does not need saving between function calls 23 23 24 24 #ifdef R9_SPECIAL … … 28 28 #endif // R9_SPECIAL 29 29 30 @save floating point registers: s16-s3130 # save floating point registers: s16-s31 31 31 vstmdb r13!, {s16-s31} 32 32 33 @save frame pointer and stack pointer to outgoing datastructure33 # save frame pointer and stack pointer to outgoing datastructure 34 34 str sp, [r0, #SP_OFFSET] 35 35 str fp, [r0, #FP_OFFSET] 36 36 37 @restore frame pointer and stack pointer from incoming datastructure37 # restore frame pointer and stack pointer from incoming datastructure 38 38 ldr fp, [r1, #FP_OFFSET] 39 39 ldr sp, [r1, #SP_OFFSET] 40 40 41 @restore floating point registers: s16-s3141 # restore floating point registers: s16-s31 42 42 vldm r13!, {s16-s31} 43 @restore r14(lr)44 @restore 64-bit extra registers?45 @restore callee-saved registers: r4-r8, r10, r11, r1343 # restore r14(lr) 44 # restore 64-bit extra registers? 45 # restore callee-saved registers: r4-r8, r10, r11, r13 46 46 47 47 #ifdef R9_SPECIAL 48 48 ldmfd r13!, {r4-r8,r10,r11,r15} 49 49 #else 50 ldmfd r13!, {r4-r11,r14} @loading r14 back into r15 returns50 ldmfd r13!, {r4-r11,r14} # loading r14 back into r15 returns 51 51 52 52 mov r15, r14
Note:
See TracChangeset
for help on using the changeset viewer.