mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
* config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Remove. * config/mn10300/mn10300.c (mn10300_asm_output_addr_const_extra): New function. (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define. From-SVN: r166955
This commit is contained in:
parent
a5cc92fdfb
commit
535bd17c2f
3 changed files with 56 additions and 43 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-11-19 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
* config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
|
||||
* config/mn10300/mn10300.c (mn10300_asm_output_addr_const_extra): New
|
||||
function.
|
||||
(TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
|
||||
|
||||
2010-11-19 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* mode-switching.c (optimize_mode_switching): Use
|
||||
|
|
|
@ -523,6 +523,52 @@ mn10300_print_operand_address (FILE *file, rtx addr)
|
|||
}
|
||||
}
|
||||
|
||||
/* 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 @@ mn10300_adjust_sched_cost (rtx insn, rtx link, rtx dep, int cost)
|
|||
#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 @@ struct cum_arg
|
|||
|
||||
/* 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
|
||||
|
|
Loading…
Add table
Reference in a new issue