diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-01 00:14:13 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-01 00:14:13 +0000 |
| commit | f3f72fd4e813dbd555f8a7463e1406add6c3ec6e (patch) | |
| tree | b14bf4c936636a0cb5afc48016ef6ccc759663e3 | |
| parent | 464c9e082a15973b9b67523343e0323fdf85a399 (diff) | |
| download | ppe42-gcc-f3f72fd4e813dbd555f8a7463e1406add6c3ec6e.tar.gz ppe42-gcc-f3f72fd4e813dbd555f8a7463e1406add6c3ec6e.zip | |
* config/ia64/ia64.c (sdata_symbolic_operand): Consider small
CONSTANT_POOL_ADDRESS_P addresses for .sdata.
* config/ia64/sysv4.h (SELECT_RTX_SECTION): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34319 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/ia64/ia64.c | 16 | ||||
| -rw-r--r-- | gcc/config/ia64/sysv4.h | 15 |
3 files changed, 32 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 53ba7fc3799..9d608718801 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 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. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 3e170f85833..8328d7f9b56 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -144,13 +144,19 @@ sdata_symbolic_operand (op, mode) { 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; } diff --git a/gcc/config/ia64/sysv4.h b/gcc/config/ia64/sysv4.h index 7e9e2c97a90..9c1c1250a92 100644 --- a/gcc/config/ia64/sysv4.h +++ b/gcc/config/ia64/sysv4.h @@ -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 |

