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
This commit is contained in:
parent
ffcec5c832
commit
a4bb41cc2f
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue