[Freemint-list] What's wrong with this code?

Thorsten Otto admin at tho-otto.de
Fri Aug 18 13:56:00 MSD 2017


On Freitag, 18. August 2017 03:02:59 CEST Miro Kropáček wrote:
> this could easily lead to a construct like (d0),

No it couldn't, since the variable is assigned to a0 in its declaration.

>Although the hint with "a0" makes the chance of happening this very low.

It's not only a hint, it's a hard assignment. It was necessary, because the 
called function expects the input variable also in a0.

>I have taken the liberty to go in the proposed direction and got rid of
>that crazy and useless asm altogether. 

Looks good.

>btw do anybody knows why fp0/fp1 are
>stored in the interrupt handler with -m68020-60 even though no FPx register
>is ever used in given handler?

I would think for the same reason why d0/d1 are saved: they could be clobbered 
in the called function.




More information about the Freemint-list mailing list