public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Stubbs <ams@codesourcery.com>
To: Richard Henderson <rth@redhat.com>
Cc: Richard Earnshaw <rearnsha@arm.com>,
	"gcc-patches@gcc.gnu.org"	<gcc-patches@gcc.gnu.org>,
	"patches@linaro.org" <patches@linaro.org>
Subject: Re: [PATCH][ARM] NEON DImode not
Date: Tue, 27 Mar 2012 20:24:00 -0000	[thread overview]
Message-ID: <4F7221C5.1030607@codesourcery.com> (raw)
In-Reply-To: <4F58F454.2030803@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

On 08/03/12 18:03, Richard Henderson wrote:
> On 03/08/12 08:19, Andrew Stubbs wrote:
>> +   (set_attr "arch" "nota8,*,*,onlya8")
>> +   (set_attr_alternative "insn_enabled"
>> +	[(if_then_else (match_test "TARGET_NEON")
>> +		       (const_string "yes") (const_string "no"))
>> +	 (const_string "yes")
>> +	 (const_string "yes")
>> +	 (if_then_else (match_test "TARGET_NEON")
>> +		       (const_string "yes") (const_string "no"))])]
>>   )
>
> While this works, it might be better to add neon/neon_na8/neon_oa8
> alternatives to the arch attribute, and adjust arch_enabled to match.
>
> Obviously this opinion is non-binding; Richard E might have other plans...

No reply from Richard so far ... so here's an update.

OK now?

Andrew

[-- Attachment #2: neon-not64.patch --]
[-- Type: text/x-patch, Size: 2302 bytes --]

2012-03-27  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/arm/arm.md (arch): Add neon_onlya8 and neon_nota8.
	(arch_enabled): Handle new arch types.
	(one_cmpldi2): Add NEON support.

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 751997f..6669329 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -207,7 +207,7 @@
 ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
 ; arm_arch6.  This attribute is used to compute attribute "enabled",
 ; use type "any" to enable an alternative in all cases.
-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,nota8"
+(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8"
   (const_string "any"))
 
 (define_attr "arch_enabled" "no,yes"
@@ -246,8 +246,18 @@
 	      (eq_attr "tune" "cortexa8"))
 	 (const_string "yes")
 
+	 (and (eq_attr "arch" "neon_onlya8")
+	      (eq_attr "tune" "cortexa8")
+	      (match_test "TARGET_NEON"))
+	 (const_string "yes")
+
 	 (and (eq_attr "arch" "nota8")
 	      (not (eq_attr "tune" "cortexa8")))
+	 (const_string "yes")
+
+	 (and (eq_attr "arch" "neon_nota8")
+	      (not (eq_attr "tune" "cortexa8"))
+	      (match_test "TARGET_NEON"))
 	 (const_string "yes")]
 	(const_string "no")))
 
@@ -4207,11 +4217,16 @@
   "")
 
 (define_insn_and_split "one_cmpldi2"
-  [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
-	(not:DI (match_operand:DI 1 "s_register_operand" "0,r")))]
+  [(set (match_operand:DI 0 "s_register_operand"	 "=w,&r,&r,?w")
+	(not:DI (match_operand:DI 1 "s_register_operand" " w, 0, r, w")))]
   "TARGET_32BIT"
-  "#"
-  "TARGET_32BIT && reload_completed"
+  "@
+   vmvn\t%P0, %P1
+   #
+   #
+   vmvn\t%P0, %P1"
+  "TARGET_32BIT && reload_completed
+   && arm_general_register_operand (operands[0], DImode)"
   [(set (match_dup 0) (not:SI (match_dup 1)))
    (set (match_dup 2) (not:SI (match_dup 3)))]
   "
@@ -4221,8 +4236,10 @@
     operands[3] = gen_highpart (SImode, operands[1]);
     operands[1] = gen_lowpart (SImode, operands[1]);
   }"
-  [(set_attr "length" "8")
-   (set_attr "predicable" "yes")]
+  [(set_attr "length" "*,8,8,*")
+   (set_attr "predicable" "yes")
+   (set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
+   (set_attr "arch" "neon_nota8,*,*,neon_onlya8")]
 )
 
 (define_expand "one_cmplsi2"

  reply	other threads:[~2012-03-27 20:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 15:24 Andrew Stubbs
2012-02-29 20:03 ` Richard Earnshaw
2012-03-01 12:57   ` Andrew Stubbs
2012-03-01 17:07     ` Richard Earnshaw
2012-03-08 16:19       ` Andrew Stubbs
2012-03-08 18:03         ` Richard Henderson
2012-03-27 20:24           ` Andrew Stubbs [this message]
2012-03-27 20:43             ` Richard Henderson
2012-03-28 13:37             ` Ramana Radhakrishnan
2012-04-05 14:47               ` Andrew Stubbs

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=4F7221C5.1030607@codesourcery.com \
    --to=ams@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=patches@linaro.org \
    --cc=rearnsha@arm.com \
    --cc=rth@redhat.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).