summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2013-07-01 19:42:40 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2013-07-01 19:42:40 +0000
commitef4129084a6cb66a2ef031ab54a8d5dd30757890 (patch)
tree0830c8eee3875d80f129734d158bd346d0fe6809
parent25e4a0d41826266b210dd5348052492977a0c587 (diff)
downloadbcm5719-llvm-ef4129084a6cb66a2ef031ab54a8d5dd30757890.tar.gz
bcm5719-llvm-ef4129084a6cb66a2ef031ab54a8d5dd30757890.zip
Fix MSP430 builtin types.
Patch by Job Noorman! llvm-svn: 185362
-rw-r--r--clang/lib/Basic/Targets.cpp6
-rw-r--r--clang/test/Preprocessor/init.c10
-rw-r--r--clang/test/Preprocessor/stdint.c10
3 files changed, 13 insertions, 13 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 48b06a41546..b92e2ace3bb 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -4453,9 +4453,9 @@ namespace {
PointerWidth = 16; PointerAlign = 16;
SuitableAlign = 16;
SizeType = UnsignedInt;
- IntMaxType = SignedLong;
- UIntMaxType = UnsignedLong;
- IntPtrType = SignedShort;
+ IntMaxType = SignedLongLong;
+ UIntMaxType = UnsignedLongLong;
+ IntPtrType = SignedInt;
PtrDiffType = SignedInt;
SigAtomicType = SignedLong;
DescriptionString = "e-p:16:16:16-i8:8:8-i16:16:16-i32:16:32-n8:16";
diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c
index dd71d9790f5..9aa19a6361e 100644
--- a/clang/test/Preprocessor/init.c
+++ b/clang/test/Preprocessor/init.c
@@ -1265,10 +1265,10 @@
// MSP430:#define __INT32_C_SUFFIX__ L
// MSP430:#define __INT32_TYPE__ long int
// MSP430:#define __INT8_TYPE__ char
-// MSP430:#define __INTMAX_MAX__ 2147483647L
-// MSP430:#define __INTMAX_TYPE__ long int
-// MSP430:#define __INTMAX_WIDTH__ 32
-// MSP430:#define __INTPTR_TYPE__ short
+// MSP430:#define __INTMAX_MAX__ 9223372036854775807LL
+// MSP430:#define __INTMAX_TYPE__ long long int
+// MSP430:#define __INTMAX_WIDTH__ 64
+// MSP430:#define __INTPTR_TYPE__ int
// MSP430:#define __INTPTR_WIDTH__ 16
// MSP430:#define __INT_MAX__ 32767
// MSP430:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
@@ -1309,7 +1309,7 @@
// MSP430:#define __SIZE_MAX__ 65535U
// MSP430:#define __SIZE_TYPE__ unsigned int
// MSP430:#define __SIZE_WIDTH__ 16
-// MSP430:#define __UINTMAX_TYPE__ long unsigned int
+// MSP430:#define __UINTMAX_TYPE__ long long unsigned int
// MSP430:#define __USER_LABEL_PREFIX__ _
// MSP430:#define __WCHAR_MAX__ 32767
// MSP430:#define __WCHAR_TYPE__ int
diff --git a/clang/test/Preprocessor/stdint.c b/clang/test/Preprocessor/stdint.c
index c3be05d97cd..cf6f341b357 100644
--- a/clang/test/Preprocessor/stdint.c
+++ b/clang/test/Preprocessor/stdint.c
@@ -239,8 +239,8 @@
// MSP430:typedef int16_t intptr_t;
// MSP430:typedef uint16_t uintptr_t;
//
-// MSP430:typedef long int intmax_t;
-// MSP430:typedef long unsigned int uintmax_t;
+// MSP430:typedef long long int intmax_t;
+// MSP430:typedef long long unsigned int uintmax_t;
//
// MSP430:INT8_MAX_ 127
// MSP430:INT8_MIN_ (-127 -1)
@@ -289,9 +289,9 @@
// MSP430:PTRDIFF_MAX_ 32767
// MSP430:SIZE_MAX_ 65535
//
-// MSP430:INTMAX_MIN_ (-2147483647L -1)
-// MSP430:INTMAX_MAX_ 2147483647L
-// MSP430:UINTMAX_MAX_ 4294967295UL
+// MSP430:INTMAX_MIN_ (-9223372036854775807LL -1)
+// MSP430:INTMAX_MAX_ 9223372036854775807LL
+// MSP430:UINTMAX_MAX_ 18446744073709551615ULL
//
// MSP430:SIG_ATOMIC_MIN_ (-2147483647L -1)
// MSP430:SIG_ATOMIC_MAX_ 2147483647L
OpenPOWER on IntegriCloud