Linux-Sparse Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] small fixes for NIOS2
@ 2020-07-08 22:19 Luc Van Oostenryck
  2020-07-08 22:19 ` [PATCH 1/2] nios2: long double is 64-bit Luc Van Oostenryck
  2020-07-08 22:19 ` [PATCH 2/2] nios2: add non-trailing double underscore predefines Luc Van Oostenryck
  0 siblings, 2 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2020-07-08 22:19 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

Fix the width for 'long double' and add the predefines
with only the leading underscores.

Luc Van Oostenryck (2):
  nios2: long double is 64-bit
  nios2: add non-trailing double underscore predefines

 target-nios2.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] nios2: long double is 64-bit
  2020-07-08 22:19 [PATCH 0/2] small fixes for NIOS2 Luc Van Oostenryck
@ 2020-07-08 22:19 ` Luc Van Oostenryck
  2020-07-08 22:19 ` [PATCH 2/2] nios2: add non-trailing double underscore predefines Luc Van Oostenryck
  1 sibling, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2020-07-08 22:19 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

On Nios2, long double are (of course) only 64 bits width.
Specify this in the target file.

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

diff --git a/target-nios2.c b/target-nios2.c
index 05f0926e2df9..98813765b925 100644
--- a/target-nios2.c
+++ b/target-nios2.c
@@ -26,6 +26,8 @@ const struct target target_nios2 = {
 	.mach = MACH_NIOS2,
 	.bitness = ARCH_LP32,
 
+	.bits_in_longdouble = 64,
+
 	.predefine = predefine_nios2,
 	.builtins = builtins_nios2,
 };
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] nios2: add non-trailing double underscore predefines
  2020-07-08 22:19 [PATCH 0/2] small fixes for NIOS2 Luc Van Oostenryck
  2020-07-08 22:19 ` [PATCH 1/2] nios2: long double is 64-bit Luc Van Oostenryck
@ 2020-07-08 22:19 ` Luc Van Oostenryck
  1 sibling, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2020-07-08 22:19 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

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>
---
 target-nios2.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/target-nios2.c b/target-nios2.c
index 98813765b925..a478fff51e18 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[] = {
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 22:19 [PATCH 0/2] small fixes for NIOS2 Luc Van Oostenryck
2020-07-08 22:19 ` [PATCH 1/2] nios2: long double is 64-bit Luc Van Oostenryck
2020-07-08 22:19 ` [PATCH 2/2] nios2: add non-trailing double underscore predefines Luc Van Oostenryck

Linux-Sparse Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sparse/0 linux-sparse/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sparse linux-sparse/ https://lore.kernel.org/linux-sparse \
		linux-sparse@vger.kernel.org
	public-inbox-index linux-sparse

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sparse


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git