Commit 56b8e164 by Kazu Hirata Committed by Kazu Hirata

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
parent 02ccd3c9
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> 2002-11-22 Dale Johannesen <dalej@apple.com>
* toplev.c (rest_of_compilation): Fix comments. * toplev.c (rest_of_compilation): Fix comments.
......
...@@ -1440,9 +1440,6 @@ print_operand (file, x, code) ...@@ -1440,9 +1440,6 @@ print_operand (file, x, code)
case MEM: case MEM:
{ {
rtx addr = XEXP (x, 0); 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, "@"); fprintf (file, "@");
output_address (addr); output_address (addr);
...@@ -1467,7 +1464,7 @@ print_operand (file, x, code) ...@@ -1467,7 +1464,7 @@ print_operand (file, x, code)
case 'T': case 'T':
case 'S': case 'S':
/* Used for mov.w and mov.l. */ /* Used for mov.w and mov.l. */
if (tiny_ok) if (h8300_tiny_constant_address_p (addr))
fprintf (file, ":16"); fprintf (file, ":16");
break; break;
default: default:
...@@ -3763,9 +3760,7 @@ h8300_adjust_insn_length (insn, length) ...@@ -3763,9 +3760,7 @@ h8300_adjust_insn_length (insn, length)
return -6; return -6;
/* @aa:16 is 4 bytes shorter than the longest. */ /* @aa:16 is 4 bytes shorter than the longest. */
if ((GET_CODE (addr) == SYMBOL_REF if (h8300_tiny_constant_address_p (addr))
&& TINY_DATA_NAME_P (XSTR (addr, 0)))
|| h8300_tiny_constant_address_p (addr))
return -4; return -4;
/* @aa:24 is 2 bytes shorter than the longest. */ /* @aa:24 is 2 bytes shorter than the longest. */
...@@ -3925,6 +3920,10 @@ h8300_tiny_constant_address_p (x) ...@@ -3925,6 +3920,10 @@ h8300_tiny_constant_address_p (x)
unsigned HOST_WIDE_INT addr; 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) if (GET_CODE (x) != CONST_INT)
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment