Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / linux / aarch64 / non_address_bit_code_break / main.c
blobfd32712f5fa7709d9339f23a0bdfd275a92846fa
1 #include <stdint.h>
3 void foo(void) {}
4 typedef void (*FooPtr)(void);
6 int main() {
7 FooPtr fnptr = foo;
8 // Set top byte.
9 fnptr = (FooPtr)((uintptr_t)fnptr | (uintptr_t)0xff << 56);
10 // Then apply a PAuth signature to it.
11 __asm__ __volatile__("pacdza %0" : "=r"(fnptr) : "r"(fnptr));
12 // fnptr is now:
13 // <8 bit top byte tag><pointer signature><virtual address>
15 foo(); // Set break point at this line.
17 return 0;