public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/meissner/heads/dmf001)] Adjust -mlagen.
Date: Thu, 20 Oct 2022 04:11:01 +0000 (GMT)	[thread overview]
Message-ID: <20221020041101.A7B523856DD9@sourceware.org> (raw)

https://gcc.gnu.org/g:5c2d0a7f1b21946cc635ff9a50b2635fe0039447

commit 5c2d0a7f1b21946cc635ff9a50b2635fe0039447
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Thu Oct 20 00:10:42 2022 -0400

    Adjust -mlagen.
    
    2022-10-19   Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
    
            * config/rs6000/rs6000.cc (rs6000_file_start): Change the macros for
            lagen and plagen so they are the same size as the new instruction.
            Obviously, you won't be able to run the program.
            * config/rs6000/rs6000.md (lagendi3): Remove early clobber.

Diff:
---
 gcc/ChangeLog.meissner      | 17 +++++++++++++++++
 gcc/config/rs6000/rs6000.cc | 14 ++++----------
 gcc/config/rs6000/rs6000.md |  2 +-
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 3f629a7f6c1..fdeb4a29eeb 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,20 @@
+==================== dmf001, patch #20
+
+Add -mlagen.
+
+2022-10-19   Michael Meissner  <meissner@linux.ibm.com>
+
+gcc/
+
+	* config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add -mlagen.
+	* config/rs6000/rs6000.cc (rs6000_file_start): Add macros for lagen.
+	(rs6000_opt_masks): Add lagen.
+	* config/rs6000/rs6000.md (lagendi3): New insn for -mlagen support.
+	(plagendi3_nora): Likewise.
+	(plagendi3): Likewise.
+	(plagendi3_noshift): Likewise.
+	* config/rs6000/rs6000.opt (-mlagen): New option.
+
 ==================== dmf001, patch #19
 
 Add mangling for __dmr.
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 314a3641f85..f768efe119e 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -6100,27 +6100,21 @@ rs6000_file_start (void)
     {
       fprintf (file, "\n");
       fprintf (file, "\t.macro lagen rt,ra,rb,n\n");
-      fprintf (file, "\tsldi \\rt,\\rb,\\n\n");
-      fprintf (file, "\tadd \\rt,\\rt,\\ra\n");
-      fprintf (file, "\t.endm\n");
+      fprintf (file, "\taddi \\rt,\\rt,0\n");
       fprintf (file, "\n");
 
       fprintf (file, "\t.macro plagen1 rt,d,rb,n\n");
-      fprintf (file, "\tsldi \\rt,\\rb,\\n\n");
-      fprintf (file, "\tpaddi \\rt,\\rt,\\d\n");
+      fprintf (file, "\tpaddi \\rt,\\rt,0\n");
       fprintf (file, "\t.endm\n");
       fprintf (file, "\n");
 
       fprintf (file, "\t.macro plagen2 rt,d,ra,rb,n\n");
-      fprintf (file, "\tsldi \\rt,\\rb,\\n\n");
-      fprintf (file, "\tadd \\rt,\\rt,\\ra\n");
-      fprintf (file, "\tpaddi \\rt,\\rt,\\d\n");
+      fprintf (file, "\tpaddi \\rt,\\rt,0\n");
       fprintf (file, "\t.endm\n");
       fprintf (file, "\n");
 
       fprintf (file, "\t.macro plagen3 rt,d,ra,rb\n");
-      fprintf (file, "\tadd \\rt,\\rb,\\ra\n");
-      fprintf (file, "\tpaddi \\rt,\\rt,\\d\n");
+      fprintf (file, "\tpaddi \\rt,\\rt,0\n");
       fprintf (file, "\t.endm\n");
       fprintf (file, "\n");
     }
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index b84a04bd184..1af193562b2 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -15583,7 +15583,7 @@
 \f
 ;; RFC 2679, Scaled index address generation
 (define_insn "*lagendi3"
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=&r")
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
 	(plus:DI (ashift:DI (match_operand:DI 1 "gpc_reg_operand" "r")
 			    (match_operand 2 "u5bit_cint_operand" "n"))
 		 (match_operand:DI 3 "base_reg_operand" "b")))]

             reply	other threads:[~2022-10-20  4:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  4:11 Michael Meissner [this message]
2022-10-20  4:17 Michael Meissner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221020041101.A7B523856DD9@sourceware.org \
    --to=meissner@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).