|Re: [hatari-devel] Code execution discontinuities and detecting them?|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On maanantai 18 maaliskuu 2013, Laurent Sallafranque wrote:
> Sorry for the late answer, I had very little time for me these days.
> The maximum instruction length for the DSP is 2 words (all instructions
> decode in 1 word and some of them need a second word for an address or a
Thanks, I added support for that and the instructions:
If you see any bugs, please comment!
DSP callgraphs have now information about call types:
(I'll look later into getting the full cost information into
callgraphs, but collecting that information and checking
branch types is a bit of a slowdown during profiling if
there are DSP symbols loaded.)
> Interrupts are quite easy to detect in the DSP, as the first $40
> locations of DSP56001 on-chip P:memory are used for interrupt vectors.
> (These adresses work 2 by 2)
> P:$0000 3 Hardware RESET (External)
> P:$0002 3 Stack Error
> P:$0004 3 Trace
> P:$0006 3 SWI (Software Interrupt)
> P:$003C 0-2 Available for Host Command
> P:$003E P:$0000 or P:$E000 0-2 Illegal Instruction
> When a program interrupts, the PC goes to one of these location (eg
> :$002E and P:$002F),
So there's no separate exception handler invocation instruction,
like TRAP on m68k?
> does execute the 1 or 2 instructions there and then
> returns to the original code.
Do you mean that exception handler can be only 1-2 instructions...?
> Careful, if the first instruction is a jump, the PC may not go to the
> second vector address
....or just that the code can be elsewhere? :-)
Is RTI instruction involved in both cases?
Can there be exceptions within exception handler, and
in which case RTI returns just to previous handler?
> If you need more infos on this point, just ask.
> There's only one RTE : in the DSP, it's called RTI
> It's opcode is 0000000 0000000 00000100
> For the branches and jump instructions, there are many instructions
> (like for the JSR ones).
Thanks, again! :-)