]> granicus.if.org Git - clang/commitdiff
[x32] Add __int128 support
authorPavel Chupin <pavel.v.chupin@intel.com>
Mon, 4 Aug 2014 12:39:43 +0000 (12:39 +0000)
committerPavel Chupin <pavel.v.chupin@intel.com>
Mon, 4 Aug 2014 12:39:43 +0000 (12:39 +0000)
Summary:
Adding __int128 support explicitly for x86_64 because currently it's on
only when pointer size >= 64 which is not the case for x32.

Test Plan: One of the tests using __int128 is updated

Reviewers: atanasyan, chandlerc

Subscribers: cfe-commits, rob.khasanov, zinovy.nis, dschuff

Differential Revision: http://reviews.llvm.org/D4755

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214710 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Sema/types.c

index e8d23a8b78d439a590b353ee195d8ffefa65f03c..034bb07b05bcdd110949515793d061c382f89706 100644 (file)
@@ -3401,6 +3401,8 @@ public:
     return CC_C;
   }
 
+  // for x32 we need it here explicitly
+  bool hasInt128Type() const override { return true; }
 };
 } // end anonymous namespace
 
index 0450de1c8e9bc736f3af9d53a0fd9eee45538020..6a22b20b0ea45983d41590310a03c2b23d0b669d 100644 (file)
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9
 // RUN: %clang_cc1 %s -pedantic -verify -triple=mips64-linux-gnu
+// RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-unknown-linux
+// RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-unknown-linux-gnux32
 
 // rdar://6097662
 typedef int (*T)[2];