Linux SNPS ARC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] [ARC] Add builtins for identifying floating point support
@ 2019-11-05 19:18 Vineet Gupta
  2019-11-06 11:51 ` Claudiu Zissulescu
  0 siblings, 1 reply; 2+ messages in thread
From: Vineet Gupta @ 2019-11-05 19:18 UTC (permalink / raw)
  To: gcc-patches; +Cc: Vineet Gupta, linux-snps-arc, Claudiu Zissulescu

Currently for hard float we need to check for
 __ARC_FPU_SP__ || __ARC_FPU_DP__ and for soft float inverse of that.
So define single convenience macros for either cases

gcc/
xxxx-xx-xx  Vineet Gupta  <vgupta@synopsyscom>

	* config/arc/arc-c.c (arc_cpu_cpp_builtins): Add
          __arc_hard_float__, __ARC_HARD_FLOAT__,
          __arc_soft_float__, __ARC_SOFT_FLOAT__

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 gcc/ChangeLog          |  6 ++++++
 gcc/config/arc/arc-c.c | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f3deffc701ff..9237e81aa011 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-05  Vineet Gupta  <vgupta@synopsys.com>
+
+	* config/arc/arc-c.c (arc_cpu_cpp_builtins) : Add
+	__arc_hard_float__, __ARC_HARD_FLOAT__,
+	__arc_soft_float__, __ARC_SOFT_FLOAT__
+
 2019-11-05  Martin Sebor  <msebor@redhat.com>
 
 	PR middle-end/92333
diff --git a/gcc/config/arc/arc-c.c b/gcc/config/arc/arc-c.c
index cf3340d29c27..1a5ff3e88a67 100644
--- a/gcc/config/arc/arc-c.c
+++ b/gcc/config/arc/arc-c.c
@@ -71,4 +71,14 @@ arc_cpu_cpp_builtins (cpp_reader * pfile)
   if (TARGET_BIG_ENDIAN)
     builtin_define ("__big_endian__");
 
+  if (TARGET_HARD_FLOAT)
+    {
+      builtin_define ("__arc_hard_float__");
+      builtin_define ("__ARC_HARD_FLOAT__");
+    }
+  else
+    {
+      builtin_define ("__arc_soft_float__");
+      builtin_define ("__ARC_SOFT_FLOAT__");
+    }
 }
-- 
2.20.1


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [ARC] Add builtins for identifying floating point support
  2019-11-05 19:18 [PATCH] [ARC] Add builtins for identifying floating point support Vineet Gupta
@ 2019-11-06 11:51 ` Claudiu Zissulescu
  0 siblings, 0 replies; 2+ messages in thread
From: Claudiu Zissulescu @ 2019-11-06 11:51 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: linux-snps-arc, gcc-patches, Claudiu Zissulescu

Ok, I'll push it asap.

Thank you for your help,
Claudiu

On Tue, Nov 5, 2019 at 8:19 PM Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:
>
> Currently for hard float we need to check for
>  __ARC_FPU_SP__ || __ARC_FPU_DP__ and for soft float inverse of that.
> So define single convenience macros for either cases
>
> gcc/
> xxxx-xx-xx  Vineet Gupta  <vgupta@synopsyscom>
>
>         * config/arc/arc-c.c (arc_cpu_cpp_builtins): Add
>           __arc_hard_float__, __ARC_HARD_FLOAT__,
>           __arc_soft_float__, __ARC_SOFT_FLOAT__
>
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
>  gcc/ChangeLog          |  6 ++++++
>  gcc/config/arc/arc-c.c | 10 ++++++++++
>  2 files changed, 16 insertions(+)
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index f3deffc701ff..9237e81aa011 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,9 @@
> +2019-11-05  Vineet Gupta  <vgupta@synopsys.com>
> +
> +       * config/arc/arc-c.c (arc_cpu_cpp_builtins) : Add
> +       __arc_hard_float__, __ARC_HARD_FLOAT__,
> +       __arc_soft_float__, __ARC_SOFT_FLOAT__
> +
>  2019-11-05  Martin Sebor  <msebor@redhat.com>
>
>         PR middle-end/92333
> diff --git a/gcc/config/arc/arc-c.c b/gcc/config/arc/arc-c.c
> index cf3340d29c27..1a5ff3e88a67 100644
> --- a/gcc/config/arc/arc-c.c
> +++ b/gcc/config/arc/arc-c.c
> @@ -71,4 +71,14 @@ arc_cpu_cpp_builtins (cpp_reader * pfile)
>    if (TARGET_BIG_ENDIAN)
>      builtin_define ("__big_endian__");
>
> +  if (TARGET_HARD_FLOAT)
> +    {
> +      builtin_define ("__arc_hard_float__");
> +      builtin_define ("__ARC_HARD_FLOAT__");
> +    }
> +  else
> +    {
> +      builtin_define ("__arc_soft_float__");
> +      builtin_define ("__ARC_SOFT_FLOAT__");
> +    }
>  }
> --
> 2.20.1
>

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 19:18 [PATCH] [ARC] Add builtins for identifying floating point support Vineet Gupta
2019-11-06 11:51 ` Claudiu Zissulescu

Linux SNPS ARC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-snps-arc/0 linux-snps-arc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-snps-arc linux-snps-arc/ https://lore.kernel.org/linux-snps-arc \
		linux-snps-arc@lists.infradead.org
	public-inbox-index linux-snps-arc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-snps-arc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git