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

source code of bolt/test/runtime/X86/instrumentation-xmm.c