r214710 - [x32] Add __int128 support

Pavel Chupin pavel.v.chupin at intel.com
Mon Aug 4 05:39:43 PDT 2014


Author: pvchupin
Date: Mon Aug  4 07:39:43 2014
New Revision: 214710

URL: http://llvm.org/viewvc/llvm-project?rev=214710&view=rev
Log:
[x32] Add __int128 support

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

Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/test/Sema/types.c

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=214710&r1=214709&r2=214710&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Aug  4 07:39:43 2014
@@ -3401,6 +3401,8 @@ public:
     return CC_C;
   }
 
+  // for x32 we need it here explicitly
+  bool hasInt128Type() const override { return true; }
 };
 } // end anonymous namespace
 

Modified: cfe/trunk/test/Sema/types.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/types.c?rev=214710&r1=214709&r2=214710&view=diff
==============================================================================
--- cfe/trunk/test/Sema/types.c (original)
+++ cfe/trunk/test/Sema/types.c Mon Aug  4 07:39:43 2014
@@ -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];





More information about the cfe-commits mailing list