forked from OSchip/llvm-project
[VE] Correct stack alignment
Summary: Change stack alignment from 64 bits to 128 bits to follow ABI correctly. And add a regression test for datalayout. Reviewers: simoll, k-ishizaka Reviewed By: simoll Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #llvm, #ve, #clang Differential Revision: https://reviews.llvm.org/D83173
This commit is contained in:
parent
b65d4b23f6
commit
df3bda047d
|
@ -45,7 +45,7 @@ public:
|
||||||
WCharType = UnsignedInt;
|
WCharType = UnsignedInt;
|
||||||
WIntType = UnsignedInt;
|
WIntType = UnsignedInt;
|
||||||
UseZeroLengthBitfieldAlignment = true;
|
UseZeroLengthBitfieldAlignment = true;
|
||||||
resetDataLayout("e-m:e-i64:64-n32:64-S64");
|
resetDataLayout("e-m:e-i64:64-n32:64-S128");
|
||||||
}
|
}
|
||||||
|
|
||||||
void getTargetDefines(const LangOptions &Opts,
|
void getTargetDefines(const LangOptions &Opts,
|
||||||
|
|
|
@ -250,3 +250,7 @@
|
||||||
// RUN: %clang_cc1 -triple bpfeb -o - -emit-llvm %s | \
|
// RUN: %clang_cc1 -triple bpfeb -o - -emit-llvm %s | \
|
||||||
// RUN: FileCheck %s -check-prefix=BPFEB
|
// RUN: FileCheck %s -check-prefix=BPFEB
|
||||||
// BPFEB: target datalayout = "E-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
|
// BPFEB: target datalayout = "E-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
|
||||||
|
|
||||||
|
// RUN: %clang_cc1 -triple ve -o - -emit-llvm %s | \
|
||||||
|
// RUN: FileCheck %s -check-prefix=VE
|
||||||
|
// VE: target datalayout = "e-m:e-i64:64-n32:64-S128"
|
||||||
|
|
|
@ -41,8 +41,8 @@ static std::string computeDataLayout(const Triple &T) {
|
||||||
// VE supports 32 bit and 64 bits integer on registers
|
// VE supports 32 bit and 64 bits integer on registers
|
||||||
Ret += "-n32:64";
|
Ret += "-n32:64";
|
||||||
|
|
||||||
// Stack alignment is 64 bits
|
// Stack alignment is 128 bits
|
||||||
Ret += "-S64";
|
Ret += "-S128";
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue