aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2002-11-24 13:17:11 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-11-24 13:17:11 +0000
commit56b8e164db2f3c10e4c10e1dd73140de69e25464 (patch)
treea2b3cf53ff64dcc5ad888aa79ec6bb451d7f82d8 /gcc
parent02ccd3c984a91fc0eb9973dc05c1043e727be823 (diff)
downloadgcc-56b8e164db2f3c10e4c10e1dd73140de69e25464.zip
gcc-56b8e164db2f3c10e4c10e1dd73140de69e25464.tar.gz
gcc-56b8e164db2f3c10e4c10e1dd73140de69e25464.tar.bz2
h8300.c (print_operand): Update the use of h8300_tiny_constant_address_p.
* config/h8300/h8300.c (print_operand): Update the use of h8300_tiny_constant_address_p. (h8300_adjust_insn_length): Likewise. (h8300_tiny_constant_address_p): Check if the given rtx is a variable declared with __attribute__ ((tiny_data)). From-SVN: r59431
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/h8300/h8300.c13
2 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 60a061a..17ff992 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2002-11-23 Kazu Hirata <kazu@cs.umass.edu>
+
+ * config/h8300/h8300.c (print_operand): Update the use of
+ h8300_tiny_constant_address_p.
+ (h8300_adjust_insn_length): Likewise.
+ (h8300_tiny_constant_address_p): Check if the given rtx is a
+ variable declared with __attribute__ ((tiny_data)).
+
2002-11-22 Dale Johannesen <dalej@apple.com>
* toplev.c (rest_of_compilation): Fix comments.
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index b4d40fd..9a516c4 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -1440,9 +1440,6 @@ print_operand (file, x, code)
case MEM:
{
rtx addr = XEXP (x, 0);
- int tiny_ok = ((GET_CODE (addr) == SYMBOL_REF
- && TINY_DATA_NAME_P (XSTR (addr, 0)))
- || h8300_tiny_constant_address_p (addr));
fprintf (file, "@");
output_address (addr);
@@ -1467,7 +1464,7 @@ print_operand (file, x, code)
case 'T':
case 'S':
/* Used for mov.w and mov.l. */
- if (tiny_ok)
+ if (h8300_tiny_constant_address_p (addr))
fprintf (file, ":16");
break;
default:
@@ -3763,9 +3760,7 @@ h8300_adjust_insn_length (insn, length)
return -6;
/* @aa:16 is 4 bytes shorter than the longest. */
- if ((GET_CODE (addr) == SYMBOL_REF
- && TINY_DATA_NAME_P (XSTR (addr, 0)))
- || h8300_tiny_constant_address_p (addr))
+ if (h8300_tiny_constant_address_p (addr))
return -4;
/* @aa:24 is 2 bytes shorter than the longest. */
@@ -3925,6 +3920,10 @@ h8300_tiny_constant_address_p (x)
unsigned HOST_WIDE_INT addr;
+ /* We accept symbols declared with tiny_data. */
+ if (GET_CODE (x) == SYMBOL_REF && TINY_DATA_NAME_P (XSTR (x, 0)))
+ return 1;
+
if (GET_CODE (x) != CONST_INT)
return 0;