RE: [PATCH 2/5] [ARC] Fix FLS, SETI patterns.

2018-04-23 Thread Claudiu Zissulescu
Committed. Thank you for your review,
Claudiu

From: Andrew Burgess [andrew.burg...@embecosm.com]
Sent: Wednesday, April 18, 2018 7:57 PM
To: Claudiu Zissulescu
Cc: gcc-patches@gcc.gnu.org; francois.bed...@synopsys.com
Subject: Re: [PATCH 2/5] [ARC] Fix FLS, SETI patterns.

* Claudiu Zissulescu  [2018-04-06 11:00:11 
+0200]:

> From: claziss 
>
> Claudiu Zissulescu  
>
>   * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
>   enums into a single definition.
>   (fls): Fix predicates and printing.
>   (seti): Likewise.

Looks good,

Thanks,
Andrew

> ---
>  gcc/config/arc/arc.md | 14 +-
>  1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
> index 2ec2b48..ffd9d5b 100644
> --- a/gcc/config/arc/arc.md
> +++ b/gcc/config/arc/arc.md
> @@ -137,9 +137,7 @@
>UNSPEC_ARC_VMPY2H
>UNSPEC_ARC_VMPY2HU
>UNSPEC_ARC_STKTIE
> -  ])
>
> -(define_c_enum "vunspec" [
>VUNSPEC_ARC_RTIE
>VUNSPEC_ARC_SYNC
>VUNSPEC_ARC_BRK
> @@ -5818,21 +5816,19 @@ archs4x, archs4xd, archs4xd_slow"
> })
>
>  (define_insn "fls"
> -  [(set (match_operand:SI  0 "dest_reg_operand" "=w,w")
> - (unspec:SI [(match_operand:SI 1 "general_operand" "cL,Cal")]
> +  [(set (match_operand:SI  0 "register_operand" "=r,r")
> + (unspec:SI [(match_operand:SI 1 "nonmemory_operand" "rL,Cal")]
>   UNSPEC_ARC_FLS))]
>"TARGET_NORM && TARGET_V2"
> -  "@
> -   fls \t%0, %1
> -   fls \t%0, %1"
> +  "fls\\t%0,%1"
>[(set_attr "length" "4,8")
> (set_attr "type" "two_cycle_core,two_cycle_core")])
>
>  (define_insn "seti"
> -  [(unspec_volatile:SI [(match_operand:SI 0 "general_operand" "rL")]
> +  [(unspec_volatile:SI [(match_operand:SI 0 "nonmemory_operand" "rL")]
>  VUNSPEC_ARC_SETI)]
>"TARGET_V2"
> -  "seti  %0"
> +  "seti\\t%0"
>[(set_attr "length" "4")
> (set_attr "type" "misc")])
>
> --
> 1.9.1
>


Re: [PATCH 2/5] [ARC] Fix FLS, SETI patterns.

2018-04-18 Thread Andrew Burgess
* Claudiu Zissulescu  [2018-04-06 11:00:11 
+0200]:

> From: claziss 
> 
> Claudiu Zissulescu  
> 
>   * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
>   enums into a single definition.
>   (fls): Fix predicates and printing.
>   (seti): Likewise.

Looks good,

Thanks,
Andrew

> ---
>  gcc/config/arc/arc.md | 14 +-
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
> index 2ec2b48..ffd9d5b 100644
> --- a/gcc/config/arc/arc.md
> +++ b/gcc/config/arc/arc.md
> @@ -137,9 +137,7 @@
>UNSPEC_ARC_VMPY2H
>UNSPEC_ARC_VMPY2HU
>UNSPEC_ARC_STKTIE
> -  ])
>  
> -(define_c_enum "vunspec" [
>VUNSPEC_ARC_RTIE
>VUNSPEC_ARC_SYNC
>VUNSPEC_ARC_BRK
> @@ -5818,21 +5816,19 @@ archs4x, archs4xd, archs4xd_slow"
> })
>  
>  (define_insn "fls"
> -  [(set (match_operand:SI  0 "dest_reg_operand" "=w,w")
> - (unspec:SI [(match_operand:SI 1 "general_operand" "cL,Cal")]
> +  [(set (match_operand:SI  0 "register_operand" "=r,r")
> + (unspec:SI [(match_operand:SI 1 "nonmemory_operand" "rL,Cal")]
>   UNSPEC_ARC_FLS))]
>"TARGET_NORM && TARGET_V2"
> -  "@
> -   fls \t%0, %1
> -   fls \t%0, %1"
> +  "fls\\t%0,%1"
>[(set_attr "length" "4,8")
> (set_attr "type" "two_cycle_core,two_cycle_core")])
>  
>  (define_insn "seti"
> -  [(unspec_volatile:SI [(match_operand:SI 0 "general_operand" "rL")]
> +  [(unspec_volatile:SI [(match_operand:SI 0 "nonmemory_operand" "rL")]
>  VUNSPEC_ARC_SETI)]
>"TARGET_V2"
> -  "seti  %0"
> +  "seti\\t%0"
>[(set_attr "length" "4")
> (set_attr "type" "misc")])
>  
> -- 
> 1.9.1
> 


[PATCH 2/5] [ARC] Fix FLS, SETI patterns.

2018-04-06 Thread Claudiu Zissulescu
From: claziss 

Claudiu Zissulescu  

* config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
enums into a single definition.
(fls): Fix predicates and printing.
(seti): Likewise.
---
 gcc/config/arc/arc.md | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index 2ec2b48..ffd9d5b 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -137,9 +137,7 @@
   UNSPEC_ARC_VMPY2H
   UNSPEC_ARC_VMPY2HU
   UNSPEC_ARC_STKTIE
-  ])
 
-(define_c_enum "vunspec" [
   VUNSPEC_ARC_RTIE
   VUNSPEC_ARC_SYNC
   VUNSPEC_ARC_BRK
@@ -5818,21 +5816,19 @@ archs4x, archs4xd, archs4xd_slow"
})
 
 (define_insn "fls"
-  [(set (match_operand:SI  0 "dest_reg_operand" "=w,w")
-   (unspec:SI [(match_operand:SI 1 "general_operand" "cL,Cal")]
+  [(set (match_operand:SI  0 "register_operand" "=r,r")
+   (unspec:SI [(match_operand:SI 1 "nonmemory_operand" "rL,Cal")]
UNSPEC_ARC_FLS))]
   "TARGET_NORM && TARGET_V2"
-  "@
-   fls \t%0, %1
-   fls \t%0, %1"
+  "fls\\t%0,%1"
   [(set_attr "length" "4,8")
(set_attr "type" "two_cycle_core,two_cycle_core")])
 
 (define_insn "seti"
-  [(unspec_volatile:SI [(match_operand:SI 0 "general_operand" "rL")]
+  [(unspec_volatile:SI [(match_operand:SI 0 "nonmemory_operand" "rL")]
   VUNSPEC_ARC_SETI)]
   "TARGET_V2"
-  "seti  %0"
+  "seti\\t%0"
   [(set_attr "length" "4")
(set_attr "type" "misc")])
 
-- 
1.9.1