| 1 |
// RUN: %clang_cc1 -triple mips64-unknown-linux -O2 -target-abi n64 -emit-llvm %s -o - | FileCheck %s -check-prefix=N64 |
| 2 |
// RUN: %clang_cc1 -triple mips64-unknown-linux -O2 -target-abi n32 -emit-llvm %s -o - | FileCheck %s -check-prefix=N32 |
| 3 |
// RUN: %clang_cc1 -triple mips-unknown-linux -O2 -target-abi o32 -emit-llvm %s -o - | FileCheck %s -check-prefix=O32 |
| 4 |
|
| 5 |
#include <stdarg.h> |
| 6 |
|
| 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 |
|
| 15 |
void foo1(void) { |
| 16 |
unsigned f = 0xffffffe0; |
| 17 |
foo(1,f); |
| 18 |
} |
| 19 |
|
| 20 |
//N64: call signext i32 (i32, ...) @foo(i32 signext poison, i32 noundef signext -32) |
| 21 |
//N32: call signext i32 (i32, ...) @foo(i32 signext poison, i32 noundef signext -32) |
| 22 |
//O32: call i32 (i32, ...) @foo(i32 signext poison, i32 noundef signext -32) |