===================================================================
@@ -523,6 +523,52 @@
}
}
+/* Implement TARGET__ASM_OUTPUT_ADDR_CONST_EXTRA.
+
+ Used for PIC-specific UNSPECs. */
+
+static bool
+mn10300_asm_output_addr_const_extra (FILE *file, rtx x)
+{
+ if (GET_CODE (x) == UNSPEC)
+ {
+ switch (XINT (x, 1))
+ {
+ case UNSPEC_INT_LABEL:
+ asm_fprintf (file, ".%LLIL" HOST_WIDE_INT_PRINT_DEC,
+ INTVAL (XVECEXP (x, 0, 0)));
+ break;
+ case UNSPEC_PIC:
+ /* GLOBAL_OFFSET_TABLE or local symbols, no suffix. */
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ break;
+ case UNSPEC_GOT:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fputs ("@GOT", file);
+ break;
+ case UNSPEC_GOTOFF:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fputs ("@GOTOFF", file);
+ break;
+ case UNSPEC_PLT:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fputs ("@PLT", file);
+ break;
+ case UNSPEC_GOTSYM_OFF:
+ assemble_name (file, GOT_SYMBOL_NAME);
+ fputs ("-(", file);
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fputs ("-.)", file);
+ break;
+ default:
+ return false;
+ }
+ return true;
+ }
+ else
+ return false;
+}
+
/* Count the number of FP registers that have to be saved. */
static int
fp_regs_to_save (void)
@@ -2451,6 +2497,9 @@
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
+#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA mn10300_asm_output_addr_const_extra
+
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS MASK_MULT_BUG | MASK_PTR_A0D0
#undef TARGET_HANDLE_OPTION
===================================================================
@@ -599,49 +599,6 @@
/* Non-global SYMBOL_REFs have SYMBOL_REF_FLAG enabled. */
#define MN10300_GLOBAL_P(X) (! SYMBOL_REF_FLAG (X))
-
-/* Recognize machine-specific patterns that may appear within
- constants. Used for PIC-specific UNSPECs. */
-#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \
- do \
- if (GET_CODE (X) == UNSPEC) \
- { \
- switch (XINT ((X), 1)) \
- { \
- case UNSPEC_INT_LABEL: \
- asm_fprintf ((STREAM), ".%LLIL" HOST_WIDE_INT_PRINT_DEC, \
- INTVAL (XVECEXP ((X), 0, 0))); \
- break; \
- case UNSPEC_PIC: \
- /* GLOBAL_OFFSET_TABLE or local symbols, no suffix. */ \
- output_addr_const ((STREAM), XVECEXP ((X), 0, 0)); \
- break; \
- case UNSPEC_GOT: \
- output_addr_const ((STREAM), XVECEXP ((X), 0, 0)); \
- fputs ("@GOT", (STREAM)); \
- break; \
- case UNSPEC_GOTOFF: \
- output_addr_const ((STREAM), XVECEXP ((X), 0, 0)); \
- fputs ("@GOTOFF", (STREAM)); \
- break; \
- case UNSPEC_PLT: \
- output_addr_const ((STREAM), XVECEXP ((X), 0, 0)); \
- fputs ("@PLT", (STREAM)); \
- break; \
- case UNSPEC_GOTSYM_OFF: \
- assemble_name (STREAM, GOT_SYMBOL_NAME); \
- fputs ("-(", STREAM); \
- output_addr_const (STREAM, XVECEXP (X, 0, 0)); \
- fputs ("-.)", STREAM); \
- break; \
- default: \
- goto FAIL; \
- } \
- break; \
- } \
- else \
- goto FAIL; \
- while (0)
#define SELECT_CC_MODE(OP, X, Y) mn10300_select_cc_mode (X)
#define REVERSIBLE_CC_MODE(MODE) 0