This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed: RX: Support -mmax-constant-size=4


Hi Guys,

  I have applied the patch below to update the RX port so that it will
  accept a value of 4 in its -mmax-constant-size= option.  Previously it
  only accepted values in the range 0..3, but accepting 4 (which has the
  same effect as 0) makes intuitive sense.

Cheers
  Nick

gcc/ChangeLog
	* config/rx/rx.c (rx_is_legitimate_constant): Treat a maximum
	constant size of 4 as being the same as 0.
	* doc/invoke.texi (RX Options): Document that -mmax-constant-size
	can take values in the range 0..4.

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 156446)
+++ gcc/doc/invoke.texi	(working copy)
@@ -15554,8 +15554,8 @@
 that are used in instructions.  Constants that are too big are instead
 placed into a constant pool and referenced via register indirection.
 
-The value @var{N} can be between 0 and 3.  A value of 0, the default,
-means that constants of any size are allowed.
+The value @var{N} can be between 0 and 4.  A value of 0 (the default)
+or 4 means that constants of any size are allowed.
 
 @item -mrelax
 @opindex mrelax
Index: gcc/config/rx/rx.c
===================================================================
--- gcc/config/rx/rx.c	(revision 156446)
+++ gcc/config/rx/rx.c	(working copy)
@@ -2345,7 +2345,7 @@
     case SYMBOL_REF:
       return true;
     case CONST_DOUBLE:
-      return rx_max_constant_size == 0;
+      return (rx_max_constant_size == 0 || rx_max_constant_size == 4);
     case CONST_VECTOR:
       return false;
     default:
@@ -2353,7 +2353,7 @@
       break;
     }
 
-  if (rx_max_constant_size == 0)
+  if (rx_max_constant_size == 0  || rx_max_constant_size == 4)
     /* If there is no constraint on the size of constants
        used as operands, then any value is legitimate.  */
     return true;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]