[Libre-soc-sim] NLnet grant request, draft

lkcl luke.leighton at gmail.com
Thu Aug 12 01:42:07 BST 2021



On August 11, 2021 8:54:41 PM UTC, lkcl <luke.leighton at gmail.com> wrote:

>we had to set LR (Link Register) in simulations for Power ISA, similar
>reason, calling userspace programs.

sorry, too brief.

Power ISA uses the Link Register LR to make function calls however it is also used when a userspace program is executed.  by pushing LR onto the stack and restoring it just before function end (or program exit) the simulator knows where to continue.

by failing to set LR when executing gcc-compiled binaries under our simulator, when the program ended it also tried to execute code at address 0x0000

something similar may be happening here (the RV equivalent).

l.



More information about the Libre-soc-sim mailing list