All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Stefaniuc <mstefani@redhat.com>
To: linux-sparse@vger.kernel.org
Subject: [PATCH] Add the __builtin functions needed for INFINITY and nan().
Date: Thu, 12 Mar 2015 00:19:19 +0100	[thread overview]
Message-ID: <20150311231919.GA14617@redhat.com> (raw)

Signed-off-by: Michael Stefaniuc <mstefani@redhat.com>
---
Needed for Wine. Not all of those but have added them for completeness.


 lib.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib.c b/lib.c
index 8dc5bcf..58a7f2e 100644
--- a/lib.c
+++ b/lib.c
@@ -876,6 +876,17 @@ void declare_builtin_functions(void)
 	add_pre_buffer("extern int __builtin_islessgreater(float, float);\n");
 	add_pre_buffer("extern int __builtin_isunordered(float, float);\n");
 
+	/* And some INFINITY / NAN stuff.. */
+	add_pre_buffer("extern double __builtin_huge_val(void);\n");
+	add_pre_buffer("extern float __builtin_huge_valf(void);\n");
+	add_pre_buffer("extern long double __builtin_huge_vall(void);\n");
+	add_pre_buffer("extern double __builtin_inf(void);\n");
+	add_pre_buffer("extern float __builtin_inff(void);\n");
+	add_pre_buffer("extern long double __builtin_infl(void);\n");
+	add_pre_buffer("extern double __builtin_nan(const char *);\n");
+	add_pre_buffer("extern float __builtin_nanf(const char *);\n");
+	add_pre_buffer("extern long double __builtin_nanl(const char *);\n");
+
 	/* And some __FORTIFY_SOURCE ones.. */
 	add_pre_buffer ("extern __SIZE_TYPE__ __builtin_object_size(void *, int);\n");
 	add_pre_buffer ("extern void * __builtin___memcpy_chk(void *, const void *, __SIZE_TYPE__, __SIZE_TYPE__);\n");
-- 
2.1.0

                 reply	other threads:[~2015-03-11 23:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150311231919.GA14617@redhat.com \
    --to=mstefani@redhat.com \
    --cc=linux-sparse@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.