This is the mail archive of the
mailing list for the GCC project.
[PATCH], PowerPC #16, Update a comment and move a predicate
- From: Michael Meissner <meissner at linux dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org, segher at kernel dot crashing dot org, dje dot gcc at gmail dot com, meissner at linux dot ibm dot com
- Date: Thu, 25 Jul 2019 18:29:25 -0400
- Subject: [PATCH], PowerPC #16, Update a comment and move a predicate
This is patch #16 that fixes some things when I noticed when I was creating
patch #15. I separated it out just to simplify things. It updates a comment
in talking about pc-relative external addresses that was wrong. In also moves
a predicate so that all of the pcrel_* predicates could be together in the
I have a build queued up with these changes. Assuming that there are no
regressions, can I check these changes into the FSF tree.
This is a series of separate patches to add functionality to the PowerPC
backend to support future processors. Here is a high level summary of the
* Patches 1-8, have already been applied
* Patch 9 has been rewritten in patches 12-13
* Patch 10 is withdrawn for now
* Patch 11 adds DS offset mode to rs6000.c's reg_addr
* Patch 12 adds a new enumeration for instruction format
* Patch 13 adds support for matching prefixed insns
* Patch 14 adds pc-relative support to load up addresses
* Patch 15 renamed some functions to be smaller
* Patch 16 updated a comment and moved a predicate
* Patch 17 adds the prefixed RTL attribute & emitting 'p' before prefixed
* Patch 18 adds prefixed support for scalar types
* Patch 19 uses a separate 'future' cost structure
* Patch 20 clones power9.md for initial scheduling on future.md.
The following patches have not yet been written, but I expect them to be:
* Patch 21 finish prefixed insn support for vectors & 128-bit int/floats
* Patch 22 enable pc-relative by default
* Patch 23 add pcrel linker optimization
* Patch 24 new tests
2019-07-25 Michael Meissner <email@example.com>
* config/rs6000/predicates.md (pcrel_external_address): Update
(prefixed_mem_operand): Move lower in the file so the pcrel_*
predicates are all grouped together.
--- gcc/config/rs6000/predicates.md (revision 273798)
+++ gcc/config/rs6000/predicates.md (working copy)
@@ -1647,11 +1647,11 @@
;; Return true if the operand is an external symbol whose address can be loaded
;; into a register using:
-;; PLA reg,label@pcrel@got
+;; PLD reg,label@pcrel@got
;; The linker will either optimize this to either a PADDI if the label is
;; defined locally in another module or a PLD of the address if the label is
-;; defined in another module.
+;; defined in a shared library.
@@ -1662,13 +1662,6 @@
return addr_validate_p (op, INSN_FORM_PREFIXED, ADDR_VALIDATE_PCREL_EXT);
-;; Return 1 if op is a prefixed memory operand.
- (match_code "mem")
- return prefixed_addr_mode_p (XEXP (op, 0), GET_MODE (op));
;; Return 1 if op is a memory operand to an external variable when we
;; support pc-relative addressing and the PCREL_OPT relocation to
;; optimize references to it.
@@ -1682,6 +1675,13 @@
return addr_validate_p (addr, INSN_FORM_PREFIXED, ADDR_VALIDATE_PCREL_EXT);
+;; Return 1 if op is a prefixed memory operand.
+ (match_code "mem")
+ return prefixed_addr_mode_p (XEXP (op, 0), GET_MODE (op));
;; Match the first insn (addis) in fusing the combination of addis and loads to
;; GPR registers on power8.
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: firstname.lastname@example.org, phone: +1 (978) 899-4797