From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: gcc-patches@gcc.gnu.org
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>,
linux-snps-arc@lists.infradead.org,
Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>
Subject: [PATCH] [ARC] Add builtins for identifying floating point support
Date: Tue, 5 Nov 2019 11:18:56 -0800 [thread overview]
Message-ID: <20191105191856.14652-1-vgupta@synopsys.com> (raw)
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
next reply other threads:[~2019-11-05 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 19:18 Vineet Gupta [this message]
2019-11-06 11:51 ` [PATCH] [ARC] Add builtins for identifying floating point support Claudiu Zissulescu
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=20191105191856.14652-1-vgupta@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=Claudiu.Zissulescu@synopsys.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linux-snps-arc@lists.infradead.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