summaryrefslogtreecommitdiff
path: root/sysdeps/ia64/stackguard-macros.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-02-15 22:07:25 -0500
committerMike Frysinger <vapier@gentoo.org>2014-02-16 01:12:38 -0500
commitc70a4b1db0cf5e813ae24b0fa96a352399eb6edf (patch)
tree5a36b0f0955682ae5232907d04fdf68589990783 /sysdeps/ia64/stackguard-macros.h
parent591aeaf7a99bc9aa9179f013114d92496952dced (diff)
downloadglibc-c70a4b1db0cf5e813ae24b0fa96a352399eb6edf.tar.gz
ia64: relocate out of ports/ subdir
Diffstat (limited to 'sysdeps/ia64/stackguard-macros.h')
-rw-r--r--sysdeps/ia64/stackguard-macros.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/ia64/stackguard-macros.h b/sysdeps/ia64/stackguard-macros.h
new file mode 100644
index 0000000000..390729327a
--- /dev/null
+++ b/sysdeps/ia64/stackguard-macros.h
@@ -0,0 +1,7 @@
+#include <stdint.h>
+
+#define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("adds %0 = -8, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
+
+#define POINTER_CHK_GUARD \
+ ({ uintptr_t x; asm ("adds %0 = -16, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })