diff options
| author | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2015-12-14 17:51:50 +0000 |
|---|---|---|
| committer | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2015-12-14 17:51:50 +0000 |
| commit | 88a328fbbede8750a401a62c9e3677d681619999 (patch) | |
| tree | 13735597704163c459eb8a6d80a9d2c2fd669b15 /clang/test/CodeGen | |
| parent | 67390c6cd335f2df292dd4784061432346d15aa3 (diff) | |
| download | bcm5719-llvm-88a328fbbede8750a401a62c9e3677d681619999.tar.gz bcm5719-llvm-88a328fbbede8750a401a62c9e3677d681619999.zip | |
[Power PC] add soft float support for ppc32
This patch enables soft float support for ppc32 architecture and fixes
the ABI for variadic functions. This is the first in a set of patches
for soft float support in LLVM.
Patch by Strahinja Petrovic.
Differential Revision: http://reviews.llvm.org/D13351
llvm-svn: 255515
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/ppc-sfvarargs.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ppc-sfvarargs.c b/clang/test/CodeGen/ppc-sfvarargs.c new file mode 100644 index 00000000000..745c329435b --- /dev/null +++ b/clang/test/CodeGen/ppc-sfvarargs.c @@ -0,0 +1,17 @@ +// RUN: %clang -O0 --target=powerpc-unknown-linux-gnu -EB -msoft-float -S -emit-llvm %s -o - | FileCheck %s + +#include <stdarg.h> +void test(char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + va_arg(ap, double); + va_end(ap); +} + +void foo() { + double a; + test("test",a); +} +// CHECK: %{{[0-9]+}} = add i8 %numUsedRegs, 1 +// CHECK: %{{[0-9]+}} = and i8 %{{[0-9]+}}, -2 +// CHECK: %{{[0-9]+}} = mul i8 %{{[0-9]+}}, 4
\ No newline at end of file |

