-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library doesn't preserve IY register in SMSlib_PSGaiden.c #5
Comments
According to the SDCC manual, if I got the meaning correctly, it should be the other way around.
|
I mistyped there - in the above I meant the Despite what the manual says, I have come across instances where sdcc has used an old IY value across a function call that did not indicate IY was preserved. I tried some test compiles tonight to try to find an example without success but I will continue to try a few more and see if I can find an example. |
If you find that some generated code is assuming that IY is unchanged after a call, then it might be an SDCC error - or you might have called a function that has a (I also edited my last post to fix that |
closing this |
Unless programs are compiled with the
--reserve-regs-iy
flag, SDCC expects the IY register to be preserved across calls just like IX.In SMSlib_PSGaiden.c, IY is used but is not saved. IX is saved.
The text was updated successfully, but these errors were encountered: