predicates.md (input_operand): Don't match constant pool addresses.
commit8afc36363fa15c82fb85ce971b2b7fe395fd9c9e
authorAlan Modra <amodra@gmail.com>
Sun, 20 May 2012 23:31:35 +0000 (21 09:01 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Sun, 20 May 2012 23:31:35 +0000 (21 09:01 +0930)
tree2dbf0adec4309253bde2227586c7a907945ba943
parentd1925759edc64da96c7ca73cd43728e800b0d6fa
predicates.md (input_operand): Don't match constant pool addresses.

* config/rs6000/predicates.md (input_operand): Don't match
constant pool addresses.  Remove label_ref, high and plus from
match_code list.  Remove redundant CONSTANT_P test.
(splat_input_operand): Similarly update match_code list.
(small_toc_ref): New predicate.
* config/rs6000/rs6000-protos.h (toc_relative_expr_p): Update prototype.
* config/rs6000/rs6000.c (tocrel_base, tocrel_offset): Make const.
(legitimate_constant_pool_address_p): Move TARGET_TOC test and
register checks to..
(toc_relative_expr_p): ..here.  Add "strict" param.  Match new rtl
generated by create_TOC_reference.
(rs6000_legitimize_address): Update cerate_TOC_reference call.
(rs6000_delegitimize_address): Handle new rtl for toc refs.
(rs6000_cannot_force_const_mem, rs6000_find_base_term): Likewise.
(use_toc_relative_ref): New function, split out from..
(rs6000_emit_move): ..here.  Remove redundant tests.  Update
create_TOC_reference calls.
(rs6000_legitimize_reload_address): Formatting.  Handle splitting
of medium/large model toc addresses.  Use use_toc_relative_ref.
(print_operand): Formatting, style.  Adjust for toc changes.
(print_operand_address): Likewise.
(rs6000_output_addr_const_extra): Likewise.
(create_TOC_reference): Put TOC_REGISTER in UNSPEC_TOCREL rather
than a PLUS.  Use this formulation for both high and low part
of -mcmodel=medium/large toc reference too.  Before reload,
always use the small model formulation.
* config/rs6000/rs6000.md (tls_gd, tls_gd_high): Similarly avoid
a PLUS in high part of addresses here.
(tls_ld, tls_ld_high, tls_got_dtprel, tls_got_dtprel_high): Likewise.
(tls_got_tprel, tls_got_tprel_high, largetoc_high): Likewise.
(largetoc_high, largetoc_low): Move earlier.  Cope when no
base reg available.
(largetoc_high_plus): New insn.
(movsi_internal1, movsi_internal1_single, movsf_softfloat,
movdi_mfpgpr, movdi_internal64): Don't handle 'R' constraint here..
(tocref): ..instead do so here, new insn and split.

From-SVN: r187699
gcc/ChangeLog
gcc/config/rs6000/predicates.md
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md