diff options
author | Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> | 2022-04-20 14:31:34 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2022-05-22 11:45:10 +0200 |
commit | df76096c637951cf1713edf7d34940c814f8cb3d (patch) | |
tree | bca4a43d9395d9a5b96a4f892646fcfa1959276b | |
parent | c4706aa764f3ae68258ba60be6325a5662900362 (diff) | |
download | sparse-df76096c637951cf1713edf7d34940c814f8cb3d.tar.gz |
cgcc: add Xtensa support
Add support for the Xtensa architecture.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rwxr-xr-x | cgcc | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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"; |