+2004-01-26 Kazu Hirata <kazu@cs.umass.edu>
+
+ * config/h8300/h8300.c (h8300_tiny_constant_address_p): Use a
+ switch statement instead of a chain of if statements.
+
2004-01-26 Jeff Law <law@redhat.com>
* doc/contrib.texi: Minor cleanup for Paolo Carlini's entry. Add
unsigned HOST_WIDE_INT addr;
- /* We accept symbols declared with tiny_data. */
- if (GET_CODE (x) == SYMBOL_REF)
- return (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_TINY_DATA) != 0;
+ switch (GET_CODE (x))
+ {
+ case SYMBOL_REF:
+ /* We accept symbols declared with tiny_data. */
+ return (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_TINY_DATA) != 0;
- if (GET_CODE (x) != CONST_INT)
- return 0;
+ case CONST_INT:
+ addr = INTVAL (x);
+ return (TARGET_NORMAL_MODE
+ || (TARGET_H8300H
+ && (IN_RANGE (addr, h1, h2) || IN_RANGE (addr, h3, h4)))
+ || (TARGET_H8300S
+ && (IN_RANGE (addr, s1, s2) || IN_RANGE (addr, s3, s4))));
- addr = INTVAL (x);
+ default:
+ return 0;
+ }
- return (0
- || TARGET_NORMAL_MODE
- || (TARGET_H8300H
- && (IN_RANGE (addr, h1, h2) || IN_RANGE (addr, h3, h4)))
- || (TARGET_H8300S
- && (IN_RANGE (addr, s1, s2) || IN_RANGE (addr, s3, s4))));
}
int