1 | #include <stdio.h> |
2 | |
3 | void foo(float a) { |
4 | printf(format: "a = %f\n" , a); |
5 | } |
6 | |
7 | typedef void (*fptr_t)(float); |
8 | fptr_t func = foo; |
9 | |
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 | |