xref: /llvm-project/bolt/test/runtime/X86/instrumentation-xmm.c (revision 40b273998af142aefd7e72657b0a76194f8de2db)
1 #include <stdio.h>
2 
foo(float a)3 void foo(float a) {
4   printf("a = %f\n", a);
5 }
6 
7 typedef void (*fptr_t)(float);
8 fptr_t func = foo;
9 
main()10 int main() {
11   func(42);
12   return 0;
13 }
14 
15 /*
16 ## Check that BOLT instrumentation runtime preserves xmm registers.
17 
18 REQUIRES: system-linux,bolt-runtime
19 
20 RUN: %clang %cflags %s -o %t.exe -fno-inline -Wl,-q
21 RUN: llvm-bolt %t.exe --instrument -o %t.instrumented \
22 RUN:   --instrumentation-file=%t.fdata
23 RUN: %t.instrumented | FileCheck %s
24 
25 CHECK: a = 42.000000
26 */
27