diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/ppc64-long-double.cpp | 3 | ||||
-rw-r--r-- | clang/test/CodeGen/x86-long-double.cpp | 13 | ||||
-rw-r--r-- | clang/test/Driver/mlong-double-128.c | 11 |
3 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ppc64-long-double.cpp b/clang/test/CodeGen/ppc64-long-double.cpp index 56cb24a3d12..d588d6b80e9 100644 --- a/clang/test/CodeGen/ppc64-long-double.cpp +++ b/clang/test/CodeGen/ppc64-long-double.cpp @@ -2,8 +2,11 @@ // RUN: FileCheck --check-prefix=FP64 %s // RUN: %clang_cc1 -triple powerpc64-linux-gnu -emit-llvm -o - %s -mlong-double-64 | \ // RUN: FileCheck --check-prefix=FP64 %s + // RUN: %clang_cc1 -triple powerpc64-linux-gnu -emit-llvm -o - %s | \ // RUN: FileCheck --check-prefix=IBM128 %s +// RUN: %clang_cc1 -triple powerpc64-linux-musl -emit-llvm -o - -mlong-double-128 %s | \ +// RUN: FileCheck --check-prefix=IBM128 %s long double x = 0; int size = sizeof(x); diff --git a/clang/test/CodeGen/x86-long-double.cpp b/clang/test/CodeGen/x86-long-double.cpp index a05470aeab6..40ac29715fd 100644 --- a/clang/test/CodeGen/x86-long-double.cpp +++ b/clang/test/CodeGen/x86-long-double.cpp @@ -16,6 +16,15 @@ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin -mlong-double-64 | \ // RUN: FileCheck --check-prefixes=FP64,FP64-X64 %s +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686 -mlong-double-128 | \ +// RUN: FileCheck --check-prefix=FP128 %s +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin -mlong-double-128 | \ +// RUN: FileCheck --check-prefix=FP128 %s +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64 -mlong-double-128 | \ +// RUN: FileCheck --check-prefix=FP128 %s +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin -mlong-double-128 | \ +// RUN: FileCheck --check-prefix=FP128 %s + // Check -malign-double increases the alignment from 4 to 8 on x86-32. // RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686 -mlong-double-64 \ // RUN: -malign-double | FileCheck --check-prefixes=FP64,FP64-X64 %s @@ -37,7 +46,11 @@ int size = sizeof(x); // FP64-X64: @x = global double {{.*}}, align 8 // FP64-X64: @size = global i32 8 +// FP128: @x = global fp128 {{.*}}, align 16 +// FP128: @size = global i32 16 + long double foo(long double d) { return d; } // FP64: double @_Z3fooe(double %d) // FP80: x86_fp80 @_Z3fooe(x86_fp80 %d) +// FP128: fp128 @_Z3foog(fp128 %d) diff --git a/clang/test/Driver/mlong-double-128.c b/clang/test/Driver/mlong-double-128.c new file mode 100644 index 00000000000..ae76265a3b3 --- /dev/null +++ b/clang/test/Driver/mlong-double-128.c @@ -0,0 +1,11 @@ +// RUN: %clang -target powerpc-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s +// RUN: %clang -target powerpc64-pc-freebsd12 -c -### %s -mlong-double-128 2>&1 | FileCheck %s +// RUN: %clang -target powerpc64le-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s +// RUN: %clang -target i686-linux-gnu -c -### %s -mlong-double-128 2>&1 | FileCheck %s +// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s + +// CHECK: "-mlong-double-128" + +// RUN: %clang -target aarch64 -c -### %s -mlong-double-128 2>&1 | FileCheck --check-prefix=ERR %s + +// ERR: error: unsupported option '-mlong-double-128' for target 'aarch64' |