r194426 - [mips] Partially revert r193640. Stack alignment should not be determined by
Akira Hatanaka
ahatanaka at mips.com
Mon Nov 11 14:10:46 PST 2013
Author: ahatanak
Date: Mon Nov 11 16:10:46 2013
New Revision: 194426
URL: http://llvm.org/viewvc/llvm-project?rev=194426&view=rev
Log:
[mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/CodeGen/TargetInfo.cpp
cfe/trunk/test/CodeGen/mips-target-data.c
cfe/trunk/test/CodeGen/mips64-padding-arg.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=194426&r1=194425&r2=194426&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Nov 11 16:10:46 2013
@@ -5099,12 +5099,8 @@ public:
class Mips32EBTargetInfo : public Mips32TargetInfoBase {
virtual void setDescriptionString() {
- if (HasFP64)
- 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-S128";
- else
- 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-S64";
+ 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-S64";
}
public:
@@ -5121,12 +5117,8 @@ public:
class Mips32ELTargetInfo : public Mips32TargetInfoBase {
virtual void setDescriptionString() {
- if (HasFP64)
- 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-S128";
- else
- 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-S64";
+ 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-S64";
}
public:
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=194426&r1=194425&r2=194426&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon Nov 11 16:10:46 2013
@@ -4647,9 +4647,9 @@ class MipsABIInfo : public ABIInfo {
llvm::Type* returnAggregateInRegs(QualType RetTy, uint64_t Size) const;
llvm::Type* getPaddingType(uint64_t Align, uint64_t Offset) const;
public:
- MipsABIInfo(CodeGenTypes &CGT, bool _IsO32, bool HasFP64) :
+ MipsABIInfo(CodeGenTypes &CGT, bool _IsO32) :
ABIInfo(CGT), IsO32(_IsO32), MinABIStackAlignInBytes(IsO32 ? 4 : 8),
- StackAlignInBytes(IsO32 && !HasFP64 ? 8 : 16) {}
+ StackAlignInBytes(IsO32 ? 8 : 16) {}
ABIArgInfo classifyReturnType(QualType RetTy) const;
ABIArgInfo classifyArgumentType(QualType RetTy, uint64_t &Offset) const;
@@ -4661,8 +4661,8 @@ public:
class MIPSTargetCodeGenInfo : public TargetCodeGenInfo {
unsigned SizeOfUnwindException;
public:
- MIPSTargetCodeGenInfo(CodeGenTypes &CGT, bool IsO32, const TargetInfo &Info)
- : TargetCodeGenInfo(new MipsABIInfo(CGT, IsO32, Info.hasFeature("fp64"))),
+ MIPSTargetCodeGenInfo(CodeGenTypes &CGT, bool IsO32)
+ : TargetCodeGenInfo(new MipsABIInfo(CGT, IsO32)),
SizeOfUnwindException(IsO32 ? 24 : 32) {}
int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const {
@@ -5507,12 +5507,12 @@ const TargetCodeGenInfo &CodeGenModule::
return *(TheTargetCodeGenInfo = new PNaClTargetCodeGenInfo(Types));
case llvm::Triple::mips:
case llvm::Triple::mipsel:
- return *(TheTargetCodeGenInfo = new MIPSTargetCodeGenInfo(Types, true,
- getTarget()));
+ return *(TheTargetCodeGenInfo = new MIPSTargetCodeGenInfo(Types, true));
+
case llvm::Triple::mips64:
case llvm::Triple::mips64el:
- return *(TheTargetCodeGenInfo = new MIPSTargetCodeGenInfo(Types, false,
- getTarget()));
+ return *(TheTargetCodeGenInfo = new MIPSTargetCodeGenInfo(Types, false));
+
case llvm::Triple::aarch64:
return *(TheTargetCodeGenInfo = new AArch64TargetCodeGenInfo(Types));
Modified: cfe/trunk/test/CodeGen/mips-target-data.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mips-target-data.c?rev=194426&r1=194425&r2=194426&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/mips-target-data.c (original)
+++ cfe/trunk/test/CodeGen/mips-target-data.c Mon Nov 11 16:10:46 2013
@@ -7,11 +7,10 @@
// RUN: %clang -target mips64-linux-gnu -o - -emit-llvm -S %s |\
// RUN: FileCheck %s -check-prefix=64EB
// RUN: %clang -target mipsel-linux-gnu -o - -emit-llvm -S -mfp64 %s |\
-// RUN: FileCheck %s -check-prefix=32EL-FP64
+// RUN: FileCheck %s -check-prefix=32EL
// 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
-// 32EL-FP64: 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-S128
Modified: cfe/trunk/test/CodeGen/mips64-padding-arg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mips64-padding-arg.c?rev=194426&r1=194425&r2=194426&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/mips64-padding-arg.c (original)
+++ cfe/trunk/test/CodeGen/mips64-padding-arg.c Mon Nov 11 16:10:46 2013
@@ -1,6 +1,6 @@
// RUN: %clang -target mipsel-unknown-linux -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=O32
// RUN: %clang -target mips64el-unknown-linux -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s -check-prefix=N64
-// RUN: %clang -target mipsel-unknown-linux -mfp64 -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=O32-FP64
+// RUN: %clang -target mipsel-unknown-linux -mfp64 -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=O32
typedef struct {
double d;
@@ -56,8 +56,6 @@ void foo7(float a0, double a1) {
// O32-LABEL: define void @foo9()
// O32: declare void @foo10(i32, i32
-// O32-FP64-LABEL: define void @foo9()
-// O32-FP64: declare void @foo10(i32, i96
typedef struct __attribute__((aligned(16))) {
int a;
More information about the cfe-commits
mailing list