[libre-riscv-dev] power pc

Samuel Falvo II sam.falvo at gmail.com
Sat Oct 26 00:29:11 BST 2019


On Fri, Oct 25, 2019 at 1:38 PM Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> > How do page specifiers interact with subroutine calls and jumps?
>
> Been wondering about that for some time.
>
> Terminate them ie reset back to default is the safest thing to do.
>

You could also PCLSR; upon subroutine call, push what's left onto the
stack, then reset to normal ISA.  Upon return, pop what's left and
continue.

So it *might* actually be ok to just say "it's a software problem", as the

> responsibility of the compiler writer.
>

I'd say any and all control flow should be consistent. If conditional
branches resets the ISA to default, then all branches should.  The compiler
will know how many more instructions are left post-function-call anyway, so
can re-assert what it thinks is correct after the subroutine returns.


-- 
Samuel A. Falvo II


More information about the libre-riscv-dev mailing list