public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Carrot Wei <carrot@google.com>, Richard Earnshaw <rearnsha@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, ARM] PR47855 Compute attr length for thumb2 insns, 3/3 (issue4475042)
Date: Tue, 07 Jun 2011 10:41:00 -0000	[thread overview]
Message-ID: <4DEE0089.50604@redhat.com> (raw)

Hi Carrot,

> 2011-05-06  Guozhi Wei  <carrot@google.com>
>
> 	PR target/47855
> 	* config/arm/thumb2.md (thumb2_movsi_insn): Add length addtribute.
> 	(thumb2_shiftsi3_short and peephole2): Remove 3-register case.
> 	(thumb2_cbz): Refine length computation.
> 	(thumb2_cbnz): Likewise.

Not approved - yet.

The problem is the change to thumb2_movsi_insn.  You are still adding in 
the support for the STM instruction despite the fact that Richard is 
still researching how this will work with unaligned addresses.  Given 
the fact that this change is not mentioned in the ChangeLog entry, I 
will assume that you intended to remove it and just forgot.

I have no issues with the rest of your patch, so if you could submit an 
updated patch I will be happy to review it again.

One small point - when/if you do resubmit the STM part of the patch, you 
could make the code slightly cleaner by enclosing it in curly 
parentheses, thus avoiding the need to escape the double quote marks.  Ie:

+  {
+  switch (which_alternative)
+    {
+    case 0:
+    case 1:
+      return "mov%?\t%0, %1";
+
+    case 2:
+      return "mvn%?\t%0, #%B1";
+
+    case 3:
+      return "movw%?\t%0, %1";
+
+    case 4:
+      if (GET_CODE (XEXP (operands[1], 0)) == POST_INC)
+	{
+	  operands[1] = XEXP (XEXP (operands[1], 0), 0);
+	  return "ldm%(ia%)\t%1!, {%0}";
+	}
+     /* Fall through.  */
+    case 5:
+      return "ldr%?\t%0, %1";
+
+    case 6:
+      if (GET_CODE (XEXP (operands[0], 0)) == POST_INC)
+	{
+	  operands[0] = XEXP (XEXP (operands[0], 0), 0);
+	  return "stm%(ia%)\t%0!, {%1}";
+	}
+      /* Fall through.  */
+    case 7:
+      return "str%?\t%1, %0";
+
+    default:
+      gcc_unreachable ();
+    }
+  }

Cheers
   Nick

             reply	other threads:[~2011-06-07 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 10:41 Nick Clifton [this message]
2011-07-08  3:20 ` Carrot Wei
  -- strict thread matches above, loose matches on Subject: below --
2011-05-05  7:31 Guozhi Wei
2011-05-05  9:43 ` Richard Earnshaw
2011-05-06  9:27   ` Carrot Wei

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=4DEE0089.50604@redhat.com \
    --to=nickc@redhat.com \
    --cc=carrot@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rearnsha@arm.com \
    /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).