aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/darwin.h
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-10-09 18:43:36 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-10-09 18:43:36 +0000
commita0e887be6147edcd14a5b95af17456d0a01575d4 (patch)
tree614da0f4385ce7194462750a99f97fb117b32032 /gcc/config/darwin.h
parente295e3d981355c61b72eca2ee58864958655cc31 (diff)
downloadgcc-a0e887be6147edcd14a5b95af17456d0a01575d4.zip
gcc-a0e887be6147edcd14a5b95af17456d0a01575d4.tar.gz
gcc-a0e887be6147edcd14a5b95af17456d0a01575d4.tar.bz2
[Darwin, machopic 3/n] Set a SYMBOL flag for indirections.
We are able to treat these specially where needed in legitimate address tests (specifically, they are guaranteed to be pointer-aligned). gcc/ChangeLog: 2019-10-09 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (machopic_indirect_data_reference): Set flag to indicate that the new symbol is an indirection. (machopic_indirect_call_target): Likewise. * config/darwin.h (MACHO_SYMBOL_FLAG_INDIRECTION): New. (MACHO_SYMBOL_INDIRECTION_P): New. (MACHO_SYMBOL_FLAG_STATIC): Adjust bit number. From-SVN: r276767
Diffstat (limited to 'gcc/config/darwin.h')
-rw-r--r--gcc/config/darwin.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 7fab869..f331fa1 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -843,12 +843,19 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
#define MACHO_SYMBOL_HIDDEN_VIS_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_HIDDEN_VIS) != 0)
+/* Set on a symbol that is a pic stub or symbol indirection (i.e. the
+ L_xxxxx${stub,non_lazy_ptr,lazy_ptr}. */
+
+#define MACHO_SYMBOL_FLAG_INDIRECTION ((SYMBOL_FLAG_SUBT_DEP) << 5)
+#define MACHO_SYMBOL_INDIRECTION_P(RTX) \
+ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_INDIRECTION) != 0)
+
/* Set on a symbol to indicate when fix-and-continue style code
generation is being used and the symbol refers to a static symbol
that should be rebound from new instances of a translation unit to
the original instance of the data. */
-#define MACHO_SYMBOL_FLAG_STATIC ((SYMBOL_FLAG_SUBT_DEP) << 5)
+#define MACHO_SYMBOL_FLAG_STATIC ((SYMBOL_FLAG_SUBT_DEP) << 6)
#define MACHO_SYMBOL_STATIC_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_STATIC) != 0)