NEWS: Add comment about changed ABI on s390 and s390x.
[glibc.git] / sysdeps / s390 / s390-64 / stackguard-macros.h
blobc8270fbe79e96f41e1a7b6779e5b4ccfc7ea410c
1 #include <stdint.h>
3 #define STACK_CHK_GUARD \
4 ({ uintptr_t x; asm ("ear %0,%%a0; sllg %0,%0,32; ear %0,%%a1; lg %0,0x28(%0)" : "=a" (x)); x; })
6 /* On s390/s390x there is no unique pointer guard, instead we use the
7 same value as the stack guard. */
8 #define POINTER_CHK_GUARD \
9 ({ \
10 uintptr_t x; \
11 asm ("ear %0,%%a0;" \
12 "sllg %0,%0,32;" \
13 "ear %0,%%a1;" \
14 "lg %0,%1(%0)" \
15 : "=a" (x) \
16 : "i" (offsetof (tcbhead_t, stack_guard))); \
17 x; \