- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
.global OSIntCtxSw
.global OSCtxSw OSIntCtxSw: OSCtxSw: addi sp, sp, -44 # ifdef ALT_STACK_CHECK bltu sp, et, .Lstack_overflow // stack overflow branch to .Lstack_overflow # endif # if OS_THREAD_SAFE_NEWLIB ldw r3, %gprel(_rimpure_pt)(gp) /* load the pointer */# endif /* OS_THREAD_SAFE_NEWLIB */ ldw r4, %gprel(OSTCBCur)(gp) // save OSTCBCur stw ra, 0(sp) // save return address stw fp, 4(sp) // save frame pointer stw r23, 8(sp) stw r22, 12(sp) //save callee register(r16 -r23); stw r21, 16(sp) stw r20, 20(sp) stw r19, 24(sp) stw r18, 28(sp) stw r17, 32(sp) stw r16, 36(sp) ............. ............ this is a part program of uc/os2's port which is related with the nios 2 cpu . I am not clear abou nios 2 's c complier , in part of the program , the program only save r16~r23(be called callee saved registers),ra,fp,why? the complier haved saved other register? I am not clera that the complier how deal with the internal register ,the nios2's hardware handbook have few introduction about the register ,where can i find details about the registers' function. thanksLink Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page