|
1 |
| -; RUN: opt < %s -S -passes=hwasan -mtriple=aarch64--linux-android29 | FileCheck --check-prefixes=CHECK,CHECK29 %s |
2 |
| -; RUN: opt < %s -S -passes=hwasan -mtriple=aarch64--linux-android30 | FileCheck --check-prefixes=CHECK,CHECK30 %s |
| 1 | +; RUN: opt < %s -S -passes=hwasan -mtriple=aarch64--linux-android29 | FileCheck --check-prefixes=CHECK,CHECK29,CHECKGLOBALNOINST %s |
| 2 | +; RUN: opt < %s -S -passes=hwasan -mtriple=aarch64--linux-android30 | FileCheck --check-prefixes=CHECK,CHECK30,CHECKGLOBALNOINST %s |
| 3 | +; RUN: opt < %s -S -passes=hwasan -mtriple=riscv64-unknown-elf -hwasan-globals=1 -hwasan-all-globals=1 | FileCheck --check-prefixes=CHECK,CHECK30,CHECKGLOBALINST %s |
3 | 4 |
|
4 | 5 | ; CHECK29: @four = global
|
5 | 6 |
|
6 | 7 | ; CHECK: @specialcaselisted = global i16 2, no_sanitize_hwaddress
|
7 |
| -; CHECK: @insection = global i16 2, section "custom" |
| 8 | +; CHECKGLOBALNOINST: @insection = global i16 2, section "custom" |
8 | 9 | ; CHECK: @__start_hwasan_globals = external hidden constant [0 x i8]
|
9 | 10 | ; CHECK: @__stop_hwasan_globals = external hidden constant [0 x i8]
|
10 | 11 |
|
|
22 | 23 | ; CHECK30: @huge.hwasan.descriptor = private constant { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (ptr @huge.hwasan to i64), i64 ptrtoint (ptr @huge.hwasan.descriptor to i64)) to i32), i32 -1358954512 }, section "hwasan_globals", !associated [[HUGE:![0-9]+]]
|
23 | 24 | ; CHECK30: @huge.hwasan.descriptor.1 = private constant { i32, i32 } { i32 trunc (i64 add (i64 sub (i64 ptrtoint (ptr @huge.hwasan to i64), i64 ptrtoint (ptr @huge.hwasan.descriptor.1 to i64)), i64 16777200) to i32), i32 -1375731680 }, section "hwasan_globals", !associated [[HUGE]]
|
24 | 25 |
|
| 26 | +; CHECKGLOBALINST: @insection.hwasan = private global { i16, [14 x i8] } { i16 2, [14 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\00\00\AF" }, section "custom", align 16 |
| 27 | + |
25 | 28 | ; CHECK30: @four = alias i32, inttoptr (i64 add (i64 ptrtoint (ptr @four.hwasan to i64), i64 -6052837899185946624) to ptr)
|
26 | 29 | ; CHECK30: @sixteen = alias [16 x i8], inttoptr (i64 add (i64 ptrtoint (ptr @sixteen.hwasan to i64), i64 -5980780305148018688) to ptr)
|
27 | 30 | ; CHECK30: @huge = alias [16777232 x i8], inttoptr (i64 add (i64 ptrtoint (ptr @huge.hwasan to i64), i64 -5908722711110090752) to ptr)
|
|
0 commit comments