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/3] arm: add predefine __ARMEL__ or __ARMEB__
Date: Wed,  8 Jul 2020 23:53:29 +0200	[thread overview]
Message-ID: <20200708215329.56404-4-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20200708215329.56404-1-luc.vanoostenryck@gmail.com>

Depending on the endianness, predefine '__ARMEL__' or '__ARMEB__'.

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

diff --git a/target-arm.c b/target-arm.c
index 0d7c6134795f..382bd3decfe1 100644
--- a/target-arm.c
+++ b/target-arm.c
@@ -19,6 +19,11 @@ static void predefine_arm(const struct target *self)
 		predefine("__ARM_PCS", 1, "1");
 		break;
 	}
+
+	if (arch_big_endian)
+		predefine("__ARMEB__", 0, "1");
+	else
+		predefine("__ARMEL__", 0, "1");
 }
 
 const struct target target_arm = {
-- 
2.27.0


      parent reply	other threads:[~2020-07-08 21:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 21:53 [PATCH 0/3] add the predefines for endianness Luc Van Oostenryck
2020-07-08 21:53 ` [PATCH 1/3] mips: add predefines __MIPSEL__ or __MIPSEB__ & friends Luc Van Oostenryck
2020-07-08 21:53 ` [PATCH 2/3] arm64: add predefine for endianness Luc Van Oostenryck
2020-07-08 21:53 ` Luc Van Oostenryck [this message]

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=20200708215329.56404-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).