GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
gcc/sh

SH: Fix PR 67643 amendment

SH target fixes a regression in fpscr register handling introduced by a previous commit.

This commit corrects an issue in the SH target’s floating-point status and control register (fpscr) handling, specifically addressing a problem noted in PR 67643. It amends a previous fix by adding a missing argument to a register allocation call, ensuring correct register usage.

In Details

The fpscr_set_from_mem function in config/sh/sh.cc is modified to rectify a regression caused by commit b6b9318ac9e72d6e. The fix involves correctly passing an argument to get_free_reg, ensuring that the function properly acquires a register to store the FPSCR value when moving it from memory.

For Context
SH
A family of microarchitectures developed by Hitachi, often used in embedded systems.
fpscr
Floating-Point Status and Control Register. This register holds status flags (like exceptions) and control bits (like rounding mode) for floating-point operations.
PR 67643
Problem Report 67643, a bug filed against GCC concerning incorrect behavior on the SH architecture.
Filed Under: gccshtargetbugfixregression