2014-07-23 20:57:31 +08:00
|
|
|
// RUN: %clang_cc1 -triple aarch64_be-linux-gnu -ffreestanding -emit-llvm -O0 -o - %s | FileCheck %s
|
2014-05-07 22:45:55 +08:00
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
// A single member HFA must be aligned just like a non-HFA register argument.
|
|
|
|
double callee(int a, ...) {
|
2014-05-07 22:51:57 +08:00
|
|
|
// CHECK: = add i64 %{{.*}}, 8
|
2014-05-07 22:45:55 +08:00
|
|
|
va_list vl;
|
|
|
|
va_start(vl, a);
|
|
|
|
double result = va_arg(vl, struct { double a; }).a;
|
|
|
|
va_end(vl);
|
|
|
|
return result;
|
|
|
|
}
|