aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sh/sh.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/sh/sh.h')
-rw-r--r--gcc/config/sh/sh.h52
1 files changed, 27 insertions, 25 deletions
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index e919597..28cf110c 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -2688,31 +2688,33 @@ while (0)
On SH, if using PIC, mark a SYMBOL_REF for a non-global symbol
so that we may access it using GOTOFF instead of GOT. */
-#define ENCODE_SECTION_INFO(DECL) \
-do \
- { \
- if (flag_pic) \
- { \
- rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
- ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
- \
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = \
- (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
- || ! TREE_PUBLIC (DECL)); \
- } \
- if (TARGET_SH5) \
- { \
- rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
- ? TREE_CST_RTL (DECL) \
- : TREE_CODE (DECL) != VAR_DECL \
- ? NULL_RTX \
- : DECL_RTL (DECL)); \
- \
- if (rtl && GET_CODE (rtl) == MEM \
- && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF) \
- XEXP (rtl, 0) = gen_datalabel_ref (XEXP (rtl, 0)); \
- } \
- } \
+#define ENCODE_SECTION_INFO(DECL, FIRST) \
+do \
+ { \
+ if (!(FIRST)) \
+ break; \
+ if (flag_pic) \
+ { \
+ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
+ \
+ SYMBOL_REF_FLAG (XEXP (rtl, 0)) = \
+ (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ || ! TREE_PUBLIC (DECL)); \
+ } \
+ if (TARGET_SH5) \
+ { \
+ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ ? TREE_CST_RTL (DECL) \
+ : TREE_CODE (DECL) != VAR_DECL \
+ ? NULL_RTX \
+ : DECL_RTL (DECL)); \
+ \
+ if (rtl && GET_CODE (rtl) == MEM \
+ && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF) \
+ XEXP (rtl, 0) = gen_datalabel_ref (XEXP (rtl, 0)); \
+ } \
+ } \
while (0)
/* The prefix used to mark SYMBOL_REFs that refer to data symbols. */