[libre-riscv-dev] power pc

Luke Kenneth Casson Leighton lkcl at lkcl.net
Sat Oct 26 01:16:35 BST 2019


On Saturday, October 26, 2019, Samuel Falvo II <sam.falvo at gmail.com> wrote:

> 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.


*thinks*... ok so each function call switches to a new ISA state.  Nice.



> I'd say any and all control flow should be consistent. If conditional
> branches resets the ISA to default, then all branches should.


Yes. Has to be one or the other.


>
> The compiler

will know how many more instructions are left post-function-call anyway,


Yes.  And how many leading up to it (or any branch, conditional or not)
thus can either choose to let the count run out just as the branch occurs
or let it run in.


>  so
> can re-assert what it thinks is correct after the subroutine returns.


Ok like it.

Ok, it's the compiler's problem :)

L.


-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68


More information about the libre-riscv-dev mailing list