summaryrefslogtreecommitdiff
path: root/ports/sysdeps/aarch64/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps/aarch64/sysdep.h')
-rw-r--r--ports/sysdeps/aarch64/sysdep.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/ports/sysdeps/aarch64/sysdep.h b/ports/sysdeps/aarch64/sysdep.h
index 9349471e36..7169ba716c 100644
--- a/ports/sysdeps/aarch64/sysdep.h
+++ b/ports/sysdeps/aarch64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -78,6 +78,17 @@
# define L(name) .L##name
#endif
+/* Load or store to/from a pc-relative EXPR into/from R, using T. */
+#define LDST_PCREL(OP, R, T, EXPR) \
+ adrp T, EXPR; \
+ OP R, [T, #:lo12:EXPR];\
+
+/* Load or store to/from a got-relative EXPR into/from R, using T. */
+#define LDST_GLOBAL(OP, R, T, EXPR) \
+ adrp T, :got:EXPR; \
+ ldr T, [T, #:got_lo12:EXPR];\
+ OP R, [T];
+
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */