aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2008-12-17 22:01:17 +0300
committerAlexey Zaytsev <alexey.zaytsev@gmail.com>2008-12-18 20:30:22 +0300
commitc765f350c6473a65f0d6937355dddd198d1317a9 (patch)
treeaaa05f3de4ad1cfe1c5402592063d8b4b892cfcc
parent9a46ba1b5f134fdab62b60374073476cf5ff0599 (diff)
downloadsparse-c765f350c6473a65f0d6937355dddd198d1317a9.tar.gz
sparse-c765f350c6473a65f0d6937355dddd198d1317a9.tar.xz
sparse-c765f350c6473a65f0d6937355dddd198d1317a9.zip
Sparc64 (Sparc V9, LP64) support
This patch adds support for Sparc64 (Sparc V9, LP64). Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rwxr-xr-xcgcc7
1 files changed, 7 insertions, 0 deletions
diff --git a/cgcc b/cgcc
index 31c219a..98686a7 100755
--- a/cgcc
+++ b/cgcc
@@ -243,6 +243,11 @@ sub add_specs {
&integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
&float_types (1, 1, 33, [24,8], [53,11], [113,15]) .
&define_size_t ($m64 ? "long unsigned int" : "unsigned int"));
+ } elsif ($spec eq 'sparc64') {
+ return (' -Dsparc=1 -D__sparc=1 -D__sparc__=1 -D__sparcv9__=1 -D__sparc64__=1 -D__arch64__=1 -D__LP64__=1' .
+ &integer_types (8, 16, 32, 64, 64) .
+ &float_types (1, 1, 33, [24,8], [53,11], [113,15]) .
+ &define_size_t ("long unsigned int"));
} elsif ($spec eq 'x86_64') {
return (' -Dx86_64=1 -D__x86_64=1 -D__x86_64__=1' .
&integer_types (8, 16, 32, $m32 ? 32 : 64, 64) .
@@ -268,6 +273,8 @@ sub add_specs {
return &add_specs ('x86_64');
} elsif ($arch =~ /^(ppc)$/i) {
return &add_specs ('ppc');
+ } elsif ($arch =~ /^(sparc64)$/i) {
+ return &add_specs ('sparc64');
}
} else {
die "$0: invalid specs: $spec\n";