r274151 - in /branches/ibm/pcrel-trunk/gcc: Cha...

meissner@gcc.gnu.org meissner@gcc.gnu.org
Wed Aug 7 00:04:00 GMT 2019


Author: meissner
Date: Wed Aug  7 00:04:56 2019
New Revision: 274151

URL: https://gcc.gnu.org/viewcvs?rev=274151&root=gcc&view=rev
Log:
Add initial pc-relative support.

2019-08-06  Michael Meissner  <meissner@linux.ibm.com>

	* config.gcc (powerpc*-*-*): Add rs6000-prefixed.o.
	(rs6000*-*-*): Add rs6000-prefixed.o.
	* config/rs6000/predicates.md (lwa_operand): Add support for
	prefixed addresses.
	(pcrel_address): Use pcrel_local_or_ext_addr_p to determine if
	addresses are pc-relative.
	(pcrel_external_address): Use pcrel_local_or_ext_addr_p to
	determine if addresses are pc-relative.
	* config/rs6000/rs6000-prefixed.c: New file.
	* config/rs6000/rs6000-protos.h (prefixed_local_addr_p): New
	declaration.
	(pcrel_local_or_ext_addr_p): New declaration.
	(rs6000_final_prescan_insn): Change calling signature.
	(prefixed_load_p): New declaration.
	(prefixed_store_p): New declaration.
	(prefixed_paddi_p): New declaration.
	* config/rs6000/rs6000.c (rs6000_emit_move): If we are loading up
	a pc-relative address, just generate the normal move code.
	(print_operand_address): Use pcrel_local_or_ext_addr_p to crack
	the pc-relative address.  Add support to generate @pcrel@got for
	external addresses.
	(prefixed_local_addr_p): New function.
	(pcrel_local_or_ext_addr_p): New function.
	(rs6000_prefixed_address_mode_p): Rewrite to call
	prefixed_local_addr_p.
	* config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): New target hook.
	(ASM_OUTPUT_OPCODE): New target hook.
	* config/rs6000/rs6000.md (prefixed attribute): New INSN
	attribute.
	(prefixed_length attribute): New INSN attribute.
	(non_prefixed_length attribute): New INSN attribute.
	(length attribute): Rewrite to use the prefixed, prefixed_length,
	and non_prefixed_length attributes.
	(pcrel_addr): New insn to load up local pc-relative addresses.
	(pcrel_ext_addr): New insn to load up external pc-relative
	addresses.
	* config/rs6000/t-rs6000 (rs6000-prefixed.o): Add build rules.


Added:
    branches/ibm/pcrel-trunk/gcc/config/rs6000/rs6000-prefixed.c
Modified:
    branches/ibm/pcrel-trunk/gcc/ChangeLog.meissner
    branches/ibm/pcrel-trunk/gcc/config.gcc
    branches/ibm/pcrel-trunk/gcc/config/rs6000/predicates.md
    branches/ibm/pcrel-trunk/gcc/config/rs6000/rs6000-protos.h
    branches/ibm/pcrel-trunk/gcc/config/rs6000/rs6000.c
    branches/ibm/pcrel-trunk/gcc/config/rs6000/rs6000.h
    branches/ibm/pcrel-trunk/gcc/config/rs6000/rs6000.md
    branches/ibm/pcrel-trunk/gcc/config/rs6000/t-rs6000



More information about the Gcc-cvs mailing list