- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to read NIOS-II General purpose Register specifically r29 (Exception return Address) & r30 (Breakpoint return Address)
NIOS-II Processor Reference Handbook Page 3-11Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are working in C, you may need to create a function in assembly language.
See nios2.h and the macros for NIOS2_READ_ET(), NIOS2_WRITE_ET() which operate on register R24 (Exception temporary). I suppose you just need to clone those, but substitute the appropriate register identifier in the assembly language.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GCC generated code will often save r29 on the stack, and then use r29 as a temporary register.
Similary the assembler breakpoint stub will save r30 somewhere. So the values in the registers are very boring in any C code.
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