| 1 |
# REQUIRES: exegesis-can-measure-latency, x86_64-linux |
| 2 |
|
| 3 |
# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mode=latency -snippets-file=%s -execution-mode=subprocess | FileCheck %s |
| 4 |
|
| 5 |
# Check that the code is loaded in at the expected address. |
| 6 |
|
| 7 |
# LLVM-EXEGESIS-SNIPPET-ADDRESS 20000 |
| 8 |
# LLVM-EXEGESIS-DEFREG RAX 0 |
| 9 |
# LLVM-EXEGESIS-DEFREG R14 127 |
| 10 |
# LLVM-EXEGESIS-DEFREG R15 0 |
| 11 |
# LLVM-EXEGESIS-DEFREG RDI 0 |
| 12 |
|
| 13 |
# Load the instruction pointer and round down to the nearest page as there |
| 14 |
# will be some setup code loaded in before this part begins to execute. |
| 15 |
lea 0(%rip), %rax |
| 16 |
shrq $12, %rax |
| 17 |
shlq $12, %rax |
| 18 |
|
| 19 |
cmpq $0x20000, %rax |
| 20 |
cmovneq %r14, %r15 |
| 21 |
|
| 22 |
movq $60, %rax |
| 23 |
movq %r15, %rdi |
| 24 |
syscall |
| 25 |
|
| 26 |
# CHECK-NOT: error: 'Child benchmarking process exited with non-zero exit code: Child process returned with unknown exit code' |