]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add -mgrow-frame-downwards master trunk
authorMatthew Fortune <matthew.fortune@imgtec.com>
Sun, 10 Aug 2025 17:20:30 +0000 (11:20 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 10 Aug 2025 17:20:30 +0000 (11:20 -0600)
commit767f65cf82b516656dda95802a83bf905550f0b3
tree9e17c50b68819cbabec494a42aa1a92ff29613f6
parent14ad799ae1545569be158b00865f6f2f951657bd
Add -mgrow-frame-downwards

Grow the local frame down instead of up for mips16 code size.

By growing the frame downwards we get spill slots created at the lowest
address rather than highest address in a local frame. The benefit being
that when the frame is large the spill slots can still be accessed using
a 16bit instruction whereas it is less important for large local
variables to be accessed using short instructions as they are (probably)
accessed less frequently.

This is default on for MIPS16.

gcc/
* config/mips/mips.h (FRAME_GROWS_DOWNWARD) Allow the frame to
grow downwards for mips16 when -mgrow-frame-downwards is set.
* config/mips/mips.opt: Add -mgrow-frame-downwards option.
gcc/config/mips/mips.h
gcc/config/mips/mips.opt