linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cgcc: add Xtensa support
@ 2022-04-20 12:31 Guennadi Liakhovetski
  2022-05-22 10:07 ` Luc Van Oostenryck
  0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2022-04-20 12:31 UTC (permalink / raw)
  To: linux-sparse

Add support for the Xtensa architecture.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---

This should be used with the Zephyr RTOS on Xtensa as implemented in 
https://github.com/zephyrproject-rtos/zephyr/pull/43776

  cgcc | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/cgcc b/cgcc
index 9c78ee63..733cadfa 100755
--- a/cgcc
+++ b/cgcc
@@ -292,6 +292,9 @@ sub add_specs {
      } elsif ($spec eq 'aarch64') {
  	return (' --arch=aarch64' .
  		&float_types (1, 1, 36, [24,8], [53,11], [113,15]));
+    } elsif ($spec eq 'xtensa') {
+	return (' --arch=xtensa' .
+		&float_types (1, 1, 21, [24,8], [53,11], [53,11]));
      } elsif ($spec eq 'host_os_specs') {
  	my $os = `uname -s`;
  	chomp $os;
@@ -319,6 +322,8 @@ sub add_specs {
  	    return &add_specs ('x86_64') . ' -mx32';
  	} elsif ($gccmachine =~ '^x86_64-') {
  	    return &add_specs ('x86_64');
+	} elsif ($gccmachine =~ '^xtensa-') {
+	    return &add_specs ('xtensa');
  	}

  	# fall back to uname -m to determine the specifics.
@@ -348,6 +353,8 @@ sub add_specs {
  	    return &add_specs ('arm');
  	} elsif ($arch =~ /^(aarch64)$/i) {
  	    return &add_specs ('aarch64');
+	} elsif ($arch =~ /^(xtensa)$/i) {
+	    return &add_specs ('xtensa');
  	}
      } else {
  	die "$0: invalid specs: $spec\n";
-- 
2.30.2


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

* Re: [PATCH] cgcc: add Xtensa support
  2022-04-20 12:31 [PATCH] cgcc: add Xtensa support Guennadi Liakhovetski
@ 2022-05-22 10:07 ` Luc Van Oostenryck
  0 siblings, 0 replies; 2+ messages in thread
From: Luc Van Oostenryck @ 2022-05-22 10:07 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-sparse

On Wed, Apr 20, 2022 at 02:31:34PM +0200, Guennadi Liakhovetski wrote:
> Add support for the Xtensa architecture.

Thank you. Pulled and pushed.
-- Luc 

> This should be used with the Zephyr RTOS on Xtensa as implemented in
> https://github.com/zephyrproject-rtos/zephyr/pull/43776

Nice!
-- Luc 

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

end of thread, other threads:[~2022-05-22 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 12:31 [PATCH] cgcc: add Xtensa support Guennadi Liakhovetski
2022-05-22 10:07 ` Luc Van Oostenryck

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