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.
* config/ia64/ia64.c (ia64_expand_prediction): Move code ...
(ia64_print_operand) [+]: ... here. Use current_output_insn.
{
switch (GET_CODE (op))
{
+ case CONST:
+ 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:
- return XSTR (op, 0)[0] == SDATA_NAME_FLAG_CHAR;
+ 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;
- 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);
default:
break;
}
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