1 // RUN: %clang_cc1 -triple mips64-unknown-linux -O2 -target-abi n64 -S -emit-llvm %s -o - | FileCheck %s -check-prefix=N64
2 // RUN: %clang_cc1 -triple mips64-unknown-linux -O2 -target-abi n32 -S -emit-llvm %s -o - | FileCheck %s -check-prefix=N32
3 // RUN: %clang_cc1 -triple mips-unknown-linux -O2 -target-abi o32 -S -emit-llvm %s -o - | FileCheck %s -check-prefix=O32
4 
5 #include <stdarg.h>
6 
foo(int x,...)7 unsigned foo(int x, ...) {
8   va_list valist;
9   va_start(valist, x);
10   unsigned a;
11   a = va_arg(valist, unsigned);
12   return a;
13 }
14 
foo1()15 void foo1() {
16   unsigned f = 0xffffffe0;
17   foo(1,f);
18 }
19 
20 //N64: call i32 (i32, ...) @foo(i32 signext undef, i32 signext -32)
21 //N32: call i32 (i32, ...) @foo(i32 signext undef, i32 signext -32)
22 //O32: call i32 (i32, ...) @foo(i32 signext undef, i32 signext -32)