public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: Commit: RX: Do not promote vector types
Date: Mon, 08 Jun 2015 14:04:00 -0000	[thread overview]
Message-ID: <87vbey716l.fsf@redhat.com> (raw)

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),				\

                 reply	other threads:[~2015-06-08 13:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbey716l.fsf@redhat.com \
    --to=nickc@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).