1 #include <bits/wordsize.h>
5 # define STACK_CHK_GUARD \
6 ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; })
7 # define POINTER_CHK_GUARD \
8 ({ uintptr_t x; asm ("addi %0, tp, -24; ld %0, %0" : "=r" (x)); x; })
10 # define STACK_CHK_GUARD \
11 ({ uintptr_t x; asm ("addi %0, tp, -8; ld4s %0, %0" : "=r" (x)); x; })
12 # define POINTER_CHK_GUARD \
13 ({ uintptr_t x; asm ("addi %0, tp, -12; ld4s %0, %0" : "=r" (x)); x; })
16 # define STACK_CHK_GUARD \
17 ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; })
18 # define POINTER_CHK_GUARD \
19 ({ uintptr_t x; asm ("addi %0, tp, -12; lw %0, %0" : "=r" (x)); x; })