File: vectorcall-2.ispc

package info (click to toggle)
ispc 1.28.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 97,620 kB
  • sloc: cpp: 77,067; python: 8,303; yacc: 3,337; lex: 1,126; ansic: 631; sh: 475; makefile: 17
file content (20 lines) | stat: -rw-r--r-- 836 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// This test checks header files created with and without vectorcall on Windows.
// Enabled
// RUN: %{ispc} %s -h %t1.h --vectorcall --target=host --target-os=windows
// RUN: FileCheck --input-file=%t1.h %s -check-prefix=CHECK_ENABLED
// Disabled
// RUN: %{ispc} %s -h %t2.h --no-vectorcall --target=host --target-os=windows
// RUN: FileCheck --input-file=%t2.h %s -check-prefix=CHECK_DISABLED
// Default
// RUN: %{ispc} %s -h %t3.h --target=host --target-os=windows
// RUN: FileCheck --input-file=%t3.h %s -check-prefix=CHECK_DISABLED

// REQUIRES: X86_ENABLED

// REQUIRES: WINDOWS_ENABLED

// CHECK_ENABLED: extern int32_t __vectorcall addVal(int32_t val1, int32_t val2);
// CHECK_DISABLED: extern int32_t addVal(int32_t val1, int32_t val2);
export uniform int addVal( uniform int val1, uniform int val2) {
    return val1 + val2;
}