* Commit: RX: Do not promote vector types
@ 2015-06-08 14:04 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2015-06-08 14:04 UTC (permalink / raw)
To: gcc-patches
Hi Guys,
I am applying the patch below to the RX's handling of vector
functions. The RX ABI specifies that small integer return values
should always be promoted to 32-bit values, but the code that performs
this promotion was also affecting vector types. This results in
internal compiler errors when the promoted type does not match the
original vector type.
Cheers
Nick
gcc/ChangeLog
2015-06-08 Nick Clifton <nickc@redhat.com>
* config/rx/rx.c (rx_function_value): Do not promote vector types.
(rx_promote_function_mode): Likewise.
* config/rx/rx.h (LIBCALL_VALUE): Likewise.
Index: gcc/config/rx/rx.c
===================================================================
--- gcc/config/rx/rx.c (revision 224227)
+++ gcc/config/rx/rx.c (working copy)
@@ -1174,6 +1181,8 @@
if (GET_MODE_SIZE (mode) > 0
&& GET_MODE_SIZE (mode) < 4
&& ! COMPLEX_MODE_P (mode)
+ && ! VECTOR_TYPE_P (ret_type)
+ && ! VECTOR_MODE_P (mode)
)
return gen_rtx_REG (SImode, FUNC_RETURN_REGNUM);
@@ -1193,6 +1202,8 @@
if (for_return != 1
|| GET_MODE_SIZE (mode) >= 4
|| COMPLEX_MODE_P (mode)
+ || VECTOR_MODE_P (mode)
+ || VECTOR_TYPE_P (type)
|| GET_MODE_SIZE (mode) < 1)
return mode;
Index: gcc/config/rx/rx.h
===================================================================
--- gcc/config/rx/rx.h (revision 224227)
+++ gcc/config/rx/rx.h (working copy)
@@ -267,6 +267,7 @@
#define LIBCALL_VALUE(MODE) \
gen_rtx_REG (((GET_MODE_CLASS (MODE) != MODE_INT \
|| COMPLEX_MODE_P (MODE) \
+ || VECTOR_MODE_P (MODE) \
|| GET_MODE_SIZE (MODE) >= 4) \
? (MODE) \
: SImode), \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-08 13:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-08 14:04 Commit: RX: Do not promote vector types Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).