Giter Club home page Giter Club logo

Comments (4)

sverx avatar sverx commented on July 28, 2024

According to the SDCC manual, if I got the meaning correctly, it should be the other way around.
As we're not using the --reserve-regs-iy flag, IY can be used as a temporary register, as written in section 4.3 of the manual:

Register A, B, C, D, E, H, L and IY are used as a temporary registers for holding variables.

from devkitsms.

aralbrec avatar aralbrec commented on July 28, 2024

I mistyped there - in the above I meant the --reserve-regs-iy flag which I have corrected in the original post.

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.

from devkitsms.

sverx avatar sverx commented on July 28, 2024

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 __preserves_regs( ) declaration attached to it.
In either case please let me know. I'm leaving this open for your feedback :)

(I also edited my last post to fix that --reserve-regs-iy)

from devkitsms.

sverx avatar sverx commented on July 28, 2024

closing this

from devkitsms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.