4 Commits

Author SHA1 Message Date
Myles Busig
82d6d64829 Fix incorrect attribute placement on fixed::operator/
Function attributes should be placed in the function declaration, not
definition.
2024-08-03 16:15:17 -06:00
Myles Busig
d681363a7b Fix incorrect fixed point division result
Division was not returning the result as raw.
2024-08-02 23:26:24 -06:00
Myles Busig
739437753c Fix fixed point number compilation failures during attempted inlining
Currently, some fixed point operations (notably multiplication) fail to
compile when used in Thumb-mode routines. This occurs because GCC
attempts to inline the operation into the Thumb-mode routine, but the
operation uses ARM-mode only instructions. This commit adds the ".arm"
directive into the inline assembly of the implementation, which informs
GCC that the assembly uses ARM-mode instructions and prevents inlining.
As a result, fixed point numbers can be used from both ARM-mode and
Thumb-mode code without issues! Usage in ARM-mode should still be
preferred for optimal performance though.
2024-08-02 22:10:39 -06:00
Myles Busig
94706bed33 Remove conditional fixed point number inlining
Caused issues with ODR rule violations. Now fixed point numbers should
only be used in ARM-mode. Attempting to use them in Thumb-mode will
cause a compilation failure. This commit also moves operator/ into IWRAM
on the GBA.
2024-07-30 11:45:08 -06:00