r185362 - Fix MSP430 builtin types.

Anton Korobeynikov asl at math.spbu.ru
Mon Jul 1 12:42:40 PDT 2013


Author: asl
Date: Mon Jul  1 14:42:40 2013
New Revision: 185362

URL: http://llvm.org/viewvc/llvm-project?rev=185362&view=rev
Log:
Fix MSP430 builtin types.

Patch by Job Noorman!


Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/test/Preprocessor/init.c
    cfe/trunk/test/Preprocessor/stdint.c

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=185362&r1=185361&r2=185362&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Jul  1 14:42:40 2013
@@ -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";

Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=185362&r1=185361&r2=185362&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Mon Jul  1 14:42:40 2013
@@ -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

Modified: cfe/trunk/test/Preprocessor/stdint.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/stdint.c?rev=185362&r1=185361&r2=185362&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/stdint.c (original)
+++ cfe/trunk/test/Preprocessor/stdint.c Mon Jul  1 14:42:40 2013
@@ -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





More information about the cfe-commits mailing list