h8300.c (h8300_tiny_constant_address_p): Use a switch statement instead of a chain...
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 27 Jan 2004 02:59:35 +0000 (02:59 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 27 Jan 2004 02:59:35 +0000 (02:59 +0000)
* config/h8300/h8300.c (h8300_tiny_constant_address_p): Use a
switch statement instead of a chain of if statements.

From-SVN: r76689

gcc/ChangeLog
gcc/config/h8300/h8300.c

index 1e9e491ca3cd72509cd728226eb5a0ca225a3e8f..b9e9d5711498e3a3a7f4e06b120f29ca007a6373 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-26  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.c (h8300_tiny_constant_address_p): Accept
+       constant addresses in the normal mode.
+
 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * system.h (CHAR_BITFIELD): Delete.
index 97f7e9f0401f75c62899d412eea7351ca17b0984..7f027b2ed86ee28457472a4fa27ad4b461f5a132 100644 (file)
@@ -4437,8 +4437,11 @@ h8300_tiny_constant_address_p (rtx x)
   switch (GET_CODE (x))
     {
     case SYMBOL_REF:
-      /* We accept symbols declared with tiny_data.  */
-      return (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_TINY_DATA) != 0;
+      /* In the normal mode, any symbol fits in the 16-bit absolute
+        address range.  We also accept symbols declared with
+        tiny_data.  */
+      return (TARGET_NORMAL_MODE
+             || (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_TINY_DATA) != 0);
 
     case CONST_INT:
       addr = INTVAL (x);
@@ -4448,6 +4451,9 @@ h8300_tiny_constant_address_p (rtx x)
              || (TARGET_H8300S
                  && (IN_RANGE (addr, s1, s2) || IN_RANGE (addr, s3, s4))));
 
+    case CONST:
+      return TARGET_NORMAL_MODE;
+
     default:
       return 0;
     }