diff options
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r-- | sysdeps/sparc/sparc32/stackguard-macros.h | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/stackguard-macros.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc32/stackguard-macros.h b/sysdeps/sparc/sparc32/stackguard-macros.h new file mode 100644 index 0000000000..c0b02b0bbd --- /dev/null +++ b/sysdeps/sparc/sparc32/stackguard-macros.h @@ -0,0 +1,4 @@ +#include <stdint.h> + +#define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("ld [%%g7+0x14], %0" : "=r" (x)); x; }) diff --git a/sysdeps/sparc/sparc64/stackguard-macros.h b/sysdeps/sparc/sparc64/stackguard-macros.h new file mode 100644 index 0000000000..80f063558a --- /dev/null +++ b/sysdeps/sparc/sparc64/stackguard-macros.h @@ -0,0 +1,4 @@ +#include <stdint.h> + +#define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("ldx [%%g7+0x28], %0" : "=r" (x)); x; }) |