Skip to content
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

Have pokeemerald use OFast, aapcs, and ftoplevel-reorder for MODERN by default #1945

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Nov 3, 2023

  1. Have Pokeemerald use OFast, aapcs, and ftoplevel-reorder for MODERN b…

    …y default
    
    The big question is: why make these changes?
    
    Let's take a look:
    OFast is a compiler flag that allows for some standard-breaking optimizations, mostly in the floating point category. Pokeemerald rarely uses floating points and where it does, it does not require extreme accuracy. In addition, OFast optimizes for speed, not space, of which there is always 32 MB of anyway.
    
    AAPCS is the ABI that supports arm7tdmi chips and up. It mostly mandated how functions start and end in order to interwork with thumb code. apcs-gnu was back when pokeemerald was still being decompiled.
    
    Finally, ftoplevel-reorder, it is not able to be disabled on clang, and without disabling top-level reordering, the game does not boot. Or rather, it doesn't boot because only one file, m4a.c, does not play nicely with the compiler, causing the game to crash when initializing the sound. For this reason, m4a.c gets its own exception in the Makefile.
    
    These changes should be beneficial to anyone compiling on MODERN and there does not seem to be any downsides. These changes were thoroughly tested for weeks on my end, to ensure no side effects happened. I hope you enjoy this!
    
    Signed-off-by: Arven
    AreaZeroArven committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    726b018 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2023

  1. Added agb_flash

    This file also relies on function ordering to operate properly, even though as of this moment, GCC happens to not do that.
    AreaZeroArven committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    5cdda84 View commit details
    Browse the repository at this point in the history