]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Make the test for available cached PCS data more robust.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 14 Dec 2025 11:24:40 +0000 (11:24 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 16 Dec 2025 15:40:38 +0000 (15:40 +0000)
commitf3b51711dcbdd023e9928d866c8d32053ba520dc
tree9e549dfb86e8ad6f68656afc8166e892b7887149
parentc8cb5f1248165950c7f8f4b34c7676940bdd1baa
aarch64: Make the test for available cached PCS data more robust.

When we are emitting MI thunks, it can be the case that the
target function of the thunk has already been compiled, and
considered complete, with at least part of the relevant data
freed.

The deal with this, we amend the test for the availability
of the cached PCS value to check for the presence of both the
cfun and the machine content.

Since these functions are in a hot code path, use
gcc_checking_assert().

gcc/ChangeLog:

* config/aarch64/aarch64.cc
(aarch64_function_abi): Use checking assert.
(aarch64_fndecl_abi): Test for the availability of the
machine content before trying to look up the cached PCS.
Use a checking assert.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/config/aarch64/aarch64.cc