1 // RUN: %clang_asan -O0 %s -o %t
2 // RUN: %env_asan_opts=verbosity=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64-V0
3 // RUN: %env_asan_opts=verbosity=2 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64
4 // REQUIRES: powerpc64-target-arch
5
6 #include <stdio.h>
7
main()8 int main() {
9 // CHECK-PPC64: || `[{{0x0a0|0x040}}000000000, {{0x3ff|0x0ff}}fffffffff]` || HighMem ||
10 // CHECK-PPC64: || `[{{0x034|0x028}}000000000, {{0x09f|0x03f}}fffffffff]` || HighShadow ||
11 // CHECK-PPC64: || `[{{0x024|0x024}}000000000, {{0x033|0x027}}fffffffff]` || ShadowGap ||
12 // CHECK-PPC64: || `[0x020000000000, 0x023fffffffff]` || LowShadow ||
13 // CHECK-PPC64: || `[0x000000000000, 0x01ffffffffff]` || LowMem ||
14 //
15 printf("ppc64 eyecatcher \n");
16 // CHECK-PPC64-V0: ppc64 eyecatcher
17
18 return 0;
19 }
20
21 /*
22 * Two different signatures noted at the time of writing.
23 Newish kernel: (64TB address range support, starting with kernel version 3.7)
24 || `[0x0a0000000000, 0x3fffffffffff]` || HighMem ||
25 || `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
26 || `[0x024000000000, 0x033fffffffff]` || ShadowGap ||
27 || `[0x020000000000, 0x023fffffffff]` || LowShadow ||
28 || `[0x000000000000, 0x01ffffffffff]` || LowMem ||
29
30 Oldish kernel:
31 || `[0x040000000000, 0x0fffffffffff]` || HighMem ||
32 || `[0x028000000000, 0x03ffffffffff]` || HighShadow ||
33 || `[0x024000000000, 0x027fffffffff]` || ShadowGap ||
34 || `[0x020000000000, 0x023fffffffff]` || LowShadow ||
35 || `[0x000000000000, 0x01ffffffffff]` || LowMem ||
36 */
37
38