[cfe-commits] r171588 - in /cfe/trunk: lib/Basic/Targets.cpp test/CodeGen/mips-target-data.c

Akira Hatanaka ahatanaka at mips.com
Fri Jan 4 18:04:34 PST 2013


Author: ahatanak
Date: Fri Jan  4 20:04:34 2013
New Revision: 171588

URL: http://llvm.org/viewvc/llvm-project?rev=171588&view=rev
Log:
[mips] Fix data layout string. Add 64 to the list of native integer widths
and add stack alignment information.


Added:
    cfe/trunk/test/CodeGen/mips-target-data.c
Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=171588&r1=171587&r2=171588&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Jan  4 20:04:34 2013
@@ -4194,7 +4194,7 @@
 public:
   Mips32EBTargetInfo(const std::string& triple) : Mips32TargetInfoBase(triple) {
     DescriptionString = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-"
-                        "i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32";
+                        "i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64";
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
@@ -4209,7 +4209,7 @@
   Mips32ELTargetInfo(const std::string& triple) : Mips32TargetInfoBase(triple) {
     BigEndian = false;
     DescriptionString = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-"
-                        "i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32";
+                        "i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64";
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
@@ -4315,14 +4315,14 @@
     if (Name == "n32")
       DescriptionString = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-"
                           "i64:64:64-f32:32:32-f64:64:64-f128:128:128-"
-                          "v64:64:64-n32";      
+                          "v64:64:64-n32:64-S128";
   }
 public:
   Mips64EBTargetInfo(const std::string& triple) : Mips64TargetInfoBase(triple) {
     // Default ABI is n64.  
     DescriptionString = "E-p:64:64:64-i1:8:8-i8:8:32-i16:16:32-i32:32:32-"
                         "i64:64:64-f32:32:32-f64:64:64-f128:128:128-"
-                        "v64:64:64-n32";
+                        "v64:64:64-n32:64-S128";
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
@@ -4338,7 +4338,7 @@
     if (Name == "n32")
       DescriptionString = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-"
                           "i64:64:64-f32:32:32-f64:64:64-f128:128:128"
-                          "-v64:64:64-n32";      
+                          "-v64:64:64-n32:64-S128";
   }
 public:
   Mips64ELTargetInfo(const std::string& triple) : Mips64TargetInfoBase(triple) {
@@ -4346,7 +4346,7 @@
     BigEndian = false;
     DescriptionString = "e-p:64:64:64-i1:8:8-i8:8:32-i16:16:32-i32:32:32-"
                         "i64:64:64-f32:32:32-f64:64:64-f128:128:128-"
-                        "v64:64:64-n32";
+                        "v64:64:64-n32:64-S128";
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {

Added: cfe/trunk/test/CodeGen/mips-target-data.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mips-target-data.c?rev=171588&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/mips-target-data.c (added)
+++ cfe/trunk/test/CodeGen/mips-target-data.c Fri Jan  4 20:04:34 2013
@@ -0,0 +1,14 @@
+// RUN: %clang -target mipsel-linux-gnu -o - -emit-llvm -S %s |\
+// RUN: FileCheck %s -check-prefix=32EL
+// RUN: %clang -target mips-linux-gnu -o - -emit-llvm -S %s |\
+// RUN: FileCheck %s -check-prefix=32EB
+// RUN: %clang -target mips64el-linux-gnu -o - -emit-llvm -S %s |\
+// RUN: FileCheck %s -check-prefix=64EL
+// RUN: %clang -target mips64-linux-gnu -o - -emit-llvm -S %s |\
+// RUN: FileCheck %s -check-prefix=64EB
+
+// 32EL: e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64
+// 32EB: E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64
+// 64EL: e-p:64:64:64-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v64:64:64-n32:64-S128
+// 64EB: E-p:64:64:64-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v64:64:64-n32:64-S128
+





More information about the cfe-commits mailing list