summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-10-29 19:00:35 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-10-29 19:00:35 +0000
commit618b29813ac587a85513acca9710d0e3be1bc46b (patch)
tree2bcc36cfb3cf6fc3fb20b924d769562c7b74536c /clang/test
parent596d108febc0eafb77fbfaa1cdb4a026a0f65ec1 (diff)
downloadbcm5719-llvm-618b29813ac587a85513acca9710d0e3be1bc46b.tar.gz
bcm5719-llvm-618b29813ac587a85513acca9710d0e3be1bc46b.zip
[mips] Align the stack to 16-bytes for -mfp64.
llvm-svn: 193640
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/mips-target-data.c3
-rw-r--r--clang/test/CodeGen/mips64-padding-arg.c18
2 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/CodeGen/mips-target-data.c b/clang/test/CodeGen/mips-target-data.c
index 88eadcb13d6..fa03fb78ed6 100644
--- a/clang/test/CodeGen/mips-target-data.c
+++ b/clang/test/CodeGen/mips-target-data.c
@@ -6,9 +6,12 @@
// RUN: FileCheck %s -check-prefix=64EL
// 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
// 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
diff --git a/clang/test/CodeGen/mips64-padding-arg.c b/clang/test/CodeGen/mips64-padding-arg.c
index b2403b2b778..2d635c332f2 100644
--- a/clang/test/CodeGen/mips64-padding-arg.c
+++ b/clang/test/CodeGen/mips64-padding-arg.c
@@ -1,5 +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
typedef struct {
double d;
@@ -53,3 +54,20 @@ void foo7(float a0, double a1) {
foo8(a0 + 1.0f, a1 + 2.0);
}
+// 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;
+} S16;
+
+S16 s16;
+
+void foo10(int, S16);
+
+void foo9(void) {
+ foo10(1, s16);
+}
+
OpenPOWER on IntegriCloud