Hi David,
I see that these three lines re-enabe the SPE:
mfmsr r0 # As function prologs/epilogs may contain
e_or2is r0, 0x0200 # SPE instruction, enable SPE, as MSR
mtmsr r0 # register is cleared at this point
However the accumulator is not being saved in the stack, as the header in intc_sw_handlers.s states it should be, Is that not necessary?
I tried with this to save it:
evxor r3, r3, r3 ;# Clear R3
evmwumiaa r3, r3, r3 ;# read SPE accumulator value
se_stw r3, 0x04 (r1) ;# Save SPE accumulator
and this to restore it:
se_lwz r3, 0x04 (r1) ;# read SPE accumulator
evmra r3, r3 ;# restore SPE accumulator
but then if I use an instruction from mlib in the interrupt everything crashes.
I made a simple project that shows this, can you have a look?
Another question: how do I set up the error handler for IVOR32? Because I can not see what is the exception that crashes the program.
Thanks,
Marco