linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 3/9] ppc: add predefines __LONGDOUBLE128 & __LONG_DOUBLE_128__
Date: Tue, 14 Jul 2020 00:32:57 +0200	[thread overview]
Message-ID: <20200713223304.83666-4-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20200713223304.83666-1-luc.vanoostenryck@gmail.com>

On powerpc, if long double is 128-bit width, then
'__LONGDOUBLE128' & '__LONG_DOUBLE_128__' should be defined.

So do this in the target specific file.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 target-ppc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target-ppc.c b/target-ppc.c
index c0d6068f436a..dede8917cbd6 100644
--- a/target-ppc.c
+++ b/target-ppc.c
@@ -14,6 +14,10 @@ static void predefine_ppc(const struct target *self)
 	predefine("_ARCH_PPC", 1, "1");
 	if (arch_big_endian)
 		predefine("_BIG_ENDIAN", 1, "1");
+	if (ldouble_ctype.bit_size == 128) {
+		predefine("__LONGDOUBLE128", 1, "1");
+		predefine("__LONG_DOUBLE_128__", 1, "1");
+	}
 }
 
 static const char *asm_constraint_ppc(struct asm_operand *op, int c, const char *str)
-- 
2.27.0


  parent reply	other threads:[~2020-07-13 22:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 22:32 [PATCH 0/9] arch specific predefines Luc Van Oostenryck
2020-07-13 22:32 ` [PATCH 1/9] sparc: add 'sparcv8' predefines for sparc32 Luc Van Oostenryck
2020-07-13 22:32 ` [PATCH 2/9] alpha: has 64-bit long double & int128 Luc Van Oostenryck
2020-07-13 22:32 ` Luc Van Oostenryck [this message]
2020-07-13 22:32 ` [PATCH 4/9] arch: add predefines __INT_LEAST${N}_TYPE__ Luc Van Oostenryck
2020-07-13 22:32 ` [PATCH 5/9] arch: add predefines __INT_FAST${N}_TYPE__ Luc Van Oostenryck
2020-07-13 22:33 ` [PATCH 6/9] predefine: teach sparse about __SIG_ATOMIC_TYPE__ Luc Van Oostenryck
2020-07-13 22:33 ` [PATCH 7/9] arch: allow target specific [u]intptr_t & ptrdiff_t Luc Van Oostenryck
2020-07-13 22:33 ` [PATCH 8/9] x86-x32: fix it by defining a separate target for it Luc Van Oostenryck
2020-07-13 22:33 ` [PATCH 9/9] predefine: let predefine_width() take the usual interface Luc Van Oostenryck

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=20200713223304.83666-4-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.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 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 NNTP newsgroup(s).