aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-06-26 02:05:56 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-07-08 01:37:30 +0200
commit562179b3d7512b8a923fe33e4873b2f464873a07 (patch)
tree75c898855faeeacb563ef31a98438d4255cd9002
parente5c2352578cb2d29902458012c4be06fa38611f5 (diff)
downloadsparse-562179b3d7512b8a923fe33e4873b2f464873a07.tar.gz
nios2: add non-trailing double underscore predefines
For Nios2, some predefines with the trailing double underscores were added but the variant with only the leading ones are also used. So add these too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--target-nios2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/target-nios2.c b/target-nios2.c
index 98813765..a478fff5 100644
--- a/target-nios2.c
+++ b/target-nios2.c
@@ -6,13 +6,18 @@
static void predefine_nios2(const struct target *self)
{
+ predefine("__NIOS2", 1, "1");
predefine("__NIOS2__", 1, "1");
+ predefine("__nios2", 1, "1");
predefine("__nios2__", 1, "1");
- if (arch_big_endian)
+ if (arch_big_endian) {
+ predefine("__nios2_big_endian", 1, "1");
predefine("__nios2_big_endian__", 1, "1");
- else
+ } else {
+ predefine("__nios2_little_endian", 1, "1");
predefine("__nios2_little_endian__", 1, "1");
+ }
}
static const struct builtin_fn builtins_nios2[] = {