[SPARC] Fix PR target/102588

Message ID 4685452.31r3eYUQgx@fomalhaut
State New
Headers show
Series
  • [SPARC] Fix PR target/102588
Related show

Commit Message

Jason Merrill via Gcc-patches Oct. 12, 2021, 9:24 a.m.
We need a 32-byte wide integer mode (OImode) in order to handle structure 
returns in the 64-bit ABI.

Bootstrapped/regtested on SPARC/Solaris and SPARC64/Linux, applied on the 
mainline, 11 and 10 branches.


2021-10-12  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/102588
	* config/sparc/sparc-modes.def (OI): New integer mode.

-- 
Eric Botcazou

Patch

diff --git a/gcc/config/sparc/sparc-modes.def b/gcc/config/sparc/sparc-modes.def
index 5cc4743f199..057c09345a9 100644
--- a/gcc/config/sparc/sparc-modes.def
+++ b/gcc/config/sparc/sparc-modes.def
@@ -23,6 +23,9 @@  along with GCC; see the file COPYING3.  If not see
 /* 128-bit floating point */
 FLOAT_MODE (TF, 16, ieee_quad_format);
 
+/* We need a 32-byte mode to return structures in the 64-bit ABI.  */
+INT_MODE (OI, 32);
+
 /* Add any extra modes needed to represent the condition code.
 
    We have a CCNZ mode which is used for implicit comparisons with zero when