Files
clang-p2996/compiler-rt/test/asan/TestCases/debug_ppc64_mapping.cc
Will Schmidt ae4236ac6a Use GET_CURRENT_FRAME() to calculate the memory layout for power. This works
for both PPC64 Big and Little endian modes, so also eliminates the need for
the BIG_ENDIAN/LITTLE_ENDIAN #ifdeffery.

By trial and error, it also looks like the kPPC64_ShadowOffset64 value is
valid using (1ULL << 41) for both BE and LE, so that #if/#elif/#endif block
has also been simplified.

Differential Revision: http://reviews.llvm.org/D6044

llvm-svn: 221457
2014-11-06 14:58:06 +00:00

38 lines
1.5 KiB
C++

// RUN: %clang_asan -O0 %s -o %t
// RUN: env ASAN_OPTIONS=verbosity=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64-V0
// RUN: env ASAN_OPTIONS=verbosity=2 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64
// REQUIRES: powerpc64-supported-target
#include <stdio.h>
int main() {
// CHECK-PPC64: || `[{{0x0a0|0x040}}000000000, {{0x3ff|0x0ff}}fffffffff]` || HighMem ||
// CHECK-PPC64: || `[{{0x034|0x028}}000000000, {{0x09f|0x03f}}fffffffff]` || HighShadow ||
// CHECK-PPC64: || `[{{0x024|0x024}}000000000, {{0x033|0x027}}fffffffff]` || ShadowGap ||
// CHECK-PPC64: || `[0x020000000000, 0x023fffffffff]` || LowShadow ||
// CHECK-PPC64: || `[0x000000000000, 0x01ffffffffff]` || LowMem ||
//
printf("ppc64 eyecatcher \n");
// CHECK-PPC64-V0: ppc64 eyecatcher
return 0;
}
/*
* Two different signatures noted at the time of writing.
Newish kernel: (64TB address range support, starting with kernel version 3.7)
|| `[0x0a0000000000, 0x3fffffffffff]` || HighMem ||
|| `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
|| `[0x024000000000, 0x033fffffffff]` || ShadowGap ||
|| `[0x020000000000, 0x023fffffffff]` || LowShadow ||
|| `[0x000000000000, 0x01ffffffffff]` || LowMem ||
Oldish kernel:
|| `[0x040000000000, 0x0fffffffffff]` || HighMem ||
|| `[0x028000000000, 0x03ffffffffff]` || HighShadow ||
|| `[0x024000000000, 0x027fffffffff]` || ShadowGap ||
|| `[0x020000000000, 0x023fffffffff]` || LowShadow ||
|| `[0x000000000000, 0x01ffffffffff]` || LowMem ||
*/