ia64.c (sdata_symbolic_operand): Consider small CONSTANT_POOL_ADDRESS_P addresses for .sdata.

* config/ia64/ia64.c (sdata_symbolic_operand): Consider small
        CONSTANT_POOL_ADDRESS_P addresses for .sdata.
        * config/ia64/sysv4.h (SELECT_RTX_SECTION): New.

From-SVN: r34319
This commit is contained in:
Richard Henderson 2000-05-31 17:14:13 -07:00 committed by Richard Henderson
parent 85548039c4
commit ac9cd70f20
3 changed files with 33 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2000-05-31 Richard Henderson <rth@cygnus.com>
* config/ia64/ia64.c (sdata_symbolic_operand): Consider small
CONSTANT_POOL_ADDRESS_P addresses for .sdata.
* config/ia64/sysv4.h (SELECT_RTX_SECTION): New.
2000-05-31 Richard Henderson <rth@cygnus.com>
* config/ia64/ia64-protos.h (ia64_expand_prediction): Remove.

View File

@ -144,13 +144,19 @@ sdata_symbolic_operand (op, mode)
{
switch (GET_CODE (op))
{
case SYMBOL_REF:
return XSTR (op, 0)[0] == SDATA_NAME_FLAG_CHAR;
case CONST:
return (GET_CODE (XEXP (op, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
&& XSTR (XEXP (XEXP (op, 0), 0), 0)[0] == SDATA_NAME_FLAG_CHAR);
if (GET_CODE (XEXP (op, 0)) != PLUS
|| GET_CODE (XEXP (XEXP (op, 0), 0)) != SYMBOL_REF)
break;
op = XEXP (XEXP (op, 0), 0);
/* FALLTHRU */
case SYMBOL_REF:
if (CONSTANT_POOL_ADDRESS_P (op))
return GET_MODE_SIZE (get_pool_mode (op)) <= ia64_section_threshold;
else
return XSTR (op, 0)[0] == SDATA_NAME_FLAG_CHAR;
default:
break;
}

View File

@ -226,6 +226,21 @@ do { \
const_section (); \
}
/* Similarly for constant pool data. */
extern int ia64_section_threshold;
#undef SELECT_RTX_SECTION
#define SELECT_RTX_SECTION(MODE, RTX) \
{ \
if (GET_MODE_SIZE (MODE) > 0 \
&& GET_MODE_SIZE (MODE) <= ia64_section_threshold) \
sdata_section (); \
else if (flag_pic && symbolic_operand ((RTX), (MODE))) \
data_section (); \
else \
const_section (); \
}
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_sdata, in_sbss