aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/h8300/h8300.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1e9e491..b9e9d57 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 97f7e9f..7f027b2 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -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;
}