From a4bb41cc2fba94fb61022573850fd2de44e13170 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 27 Jan 2004 02:59:35 +0000 Subject: [PATCH] h8300.c (h8300_tiny_constant_address_p): Use a switch statement instead of a chain of if statements. * 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 | 5 +++++ gcc/config/h8300/h8300.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1e9e491ca3c..b9e9d571149 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-01-26 Kazu Hirata + + * config/h8300/h8300.c (h8300_tiny_constant_address_p): Accept + constant addresses in the normal mode. + 2004-01-26 Kaveh R. Ghazi * system.h (CHAR_BITFIELD): Delete. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 97f7e9f0401..7f027b2ed86 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; } -- 2.30.2