| REQUIRES: x86-registered-target |
| RUN: sancov -print-coverage-pcs %p/Inputs/test-linux_x86_64 | FileCheck %s --check-prefix=LINUX |
| RUN: llvm-objdump -d %p/Inputs/test-windows_x86_64 | FileCheck %s --check-prefix=DISAS_WIN |
| RUN: sancov -print-coverage-pcs %p/Inputs/test-windows_x86_64 | FileCheck %s --check-prefix=WINDOWS |
| RUN: sancov -print-coverage-pcs %p/Inputs/test-darwin_x86_64 | FileCheck %s --check-prefix=DARWIN |
| The coverage PCs should be equal to the return address of the call minus one. A |
| direct call is five bytes, so the coverage PCs should be call PC plus four. |
| DISAS_WIN: 14000103f: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 140001074: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 1400011df: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 140001227: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 14000147e: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 1400015b6: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 140001629: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 140001664: {{.*}} callq {{.*}} <__sanitizer_cov> |
| DISAS_WIN: 1400016f2: {{.*}} callq {{.*}} <__sanitizer_cov> |