* final.c (output_asm_insn): Pass VOIDmode to output_address.
(output_address): Add MODE argument. Pass to print_operand_address
hook.
* targhooks.c (default_print_operand_address): Add MODE argument.
* targhooks.h (default_print_operand_address): Update prototype.
* output.h (output_address): Update prototype.
* target.def (print_operand_address): Add MODE argument.
* config/vax/vax.c (print_operand_address): Pass VOIDmode to
output_address.
(print_operand): Pass access mode to output_address.
* config/mcore/mcore.c (mcore_print_operand_address): Add MODE
argument.
(mcore_print_operand): Update calls to mcore_print_operand_address.
* config/fr30/fr30.c (fr30_print_operand): Pass VOIDmode to
output_address.
* config/lm32/lm32.c (lm32_print_operand): Pass mode in calls to
output_address.
* config/tilegx/tilegx.c (output_memory_reference_mode): Remove
global.
(tilegx_print_operand): Don't set above global. Update calls to
output_address.
(tilegx_print_operand_address): Add MODE argument. Use instead of
output_memory_reference_mode global.
* config/frv/frv.c (frv_print_operand_address): Add MODE argument.
(frv_print_operand): Pass mode to frv_print_operand_address calls.
* config/mn10300/mn10300.c (mn10300_print_operand): Pass mode to
output_address.
* config/cris/cris.c (cris_print_operand_address): Add MODE
argument.
(cris_print_operand): Pass mode to output_address calls.
* config/spu/spu.c (print_operand): Pass mode to output_address
calls.
* config/aarch64/aarch64.h (aarch64_print_operand)
(aarch64_print_operand_address): Remove prototypes.
* config/aarch64/aarch64.c (aarch64_memory_reference_mode): Delete
global.
(aarch64_print_operand): Make static. Update calls to
output_address.
(aarch64_print_operand_address): Add MODE argument. Use instead of
aarch64_memory_reference_mode global.
(TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define target
hooks.
* config/aarch64/aarch64.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS):
Delete macro definitions.
* config/pa/pa.c (pa_print_operand): Pass mode in output_address
calls.
* config/xtensa/xtensa.c (print_operand): Pass mode in
output_address calls.
* config/h8300/h8300.c (h8300_print_operand_address): Add MODE
argument.
(h83000_print_operand): Update calls to h8300_print_operand_address
and output_address.
* config/ia64/ia64.c (ia64_print_operand_address): Add MODE
argument.
* config/tilepro/tilepro.c (output_memory_reference_mode): Delete
global.
(tilepro_print_operand): Pass mode to output_address.
(tilepro_print_operand_address): Add MODE argument. Use instead of
output_memory_reference_mode.
* config/nvptx/nvptx.c (output_decl_chunk, nvptx_assemble_integer)
(nvptx_output_call_insn, nvptx_print_address_operand): Pass VOIDmode
to output_address calls.
(nvptx_print_operand_address): Add MODE argument.
* config/alpha/alpha.c (print_operand): Pass mode argument in
output_address calls.
* config/m68k/m68k.c (print_operand): Pass mode argument in
output_address call.
* config/avr/avr.c (avr_print_operand_address): Add MODE argument.
(avr_print_operand): Update calls to avr_print_operand_address.
* config/sparc/sparc.c (sparc_print_operand_address): Add MODE
argument. Update calls to output_address.
(sparc_print_operand): Pass mode to output_address.
* config/iq2000/iq2000.c (iq2000_print_operand_address): Add MODE
argument.
(iq2000_print_operand): Pass mode in output_address calls.
* config/stormy16/stormy16.c (xstormy16_print_operand_address): Add
MODE argument.
(xstormy16_print_operand): Pass mode to
xstormy16_print_operand_address calls.
* config/mips/mips.c (mips_print_operand): Update calls to
output_address.
(mips_print_operand_address): Add MODE argument.
* config/epiphany/epiphany.c (epiphany_print_operand): Update calls
to output_address.
(epiphany_print_operand_address): Add MODE argument. Add FIXME note.
* config/pdp11/pdp11.c (pdp11_asm_print_operand): Update call to
output_address.
* config/rx/rx.c (rx_print_operand_address): Add MODE argument.
(rx_print_operand): Update calls to output_address,
rx_print_operand_address.
* config/nds32/nds32.c (nds32_print_operand): Update calls to
output_address.
(nds32_print_operand_address): Add MODE argument.
* config/rs6000/rs6000.c (print_operand): Pass mem mode to
output_address calls.
* config/c6x/c6x.c (print_address_offset): Pass mem mode to
output_address call.
(c6x_print_address_operand): Update calls to output_address.
(c6x_print_operand_address): Pass mode to above.
* config/v850/v850.c (v850_print_operand_address): Add MODE
argument.
(v850_print_operand): Pass mode to v850_print_operand_address,
output_address.
* config/mmix/mmix.c (mmix_print_operand_address): Add MODE
argument.
(mmix_print_operand): Pass mode in output_address calls.
* config/sh/sh.c (sh_print_operand_address): Add MODE argument.
(sh_print_operand): Pass mem mode to output_address,
sh_print_operand_address.
* config/cr16/cr16.c (cr16_print_operand_address): Add MODE
argument.
(cr16_print_operand): Pass mode to output_address,
cr16_print_operand_address.
* config/bfin/bfin.c (print_address_operand): Pass VOIDmode to
output_address.
* config/microblaze/microblaze.c (print_operand): Pass mode to
output_address.
* config/nios2/nios2.c (nios2_print_operand): Pass VOIDmode to
output_address.
(nios2_print_operand_address): Add MODE argument. Update call to
nios2_print_operand_address.
* config/s390/s390.c (print_operand): Pass mode to output_address.
* config/m32c/m32c.c (m32c_print_operand_address): Add MODE
argument.
* config/arc/arc.c (arc_print_operand): Pass VOIDmode to
output_address.
* config/arm/arm.c (arm_print_operand_address): Add MODE argument.
Use instead of output_memory_reference_mode.
(output_memory_reference_mode): Delete global.
(arm_print_operand): Pass mem mode to output_address.
* config/m32r/m32r.c (m32r_print_operand_address): Add MODE
argument.
(m32r_print_operand): Pass mode to output_address.
* config/msp430/msp430.c (msp430_print_operand_addr): Add MODE
argument.
(msp430_print_operand): Pass mode to msp430_print_operand_addr.
* config/i386/i386.c (ix86_print_operand): Pass mode to
output_address calls.
(ix86_print_operand_address): Add MODE argument.
From-SVN: r230016
+2015-11-09 Julian Brown <julian@codesourcery.com>
+
+ * final.c (output_asm_insn): Pass VOIDmode to output_address.
+ (output_address): Add MODE argument. Pass to print_operand_address
+ hook.
+ * targhooks.c (default_print_operand_address): Add MODE argument.
+ * targhooks.h (default_print_operand_address): Update prototype.
+ * output.h (output_address): Update prototype.
+ * target.def (print_operand_address): Add MODE argument.
+ * config/vax/vax.c (print_operand_address): Pass VOIDmode to
+ output_address.
+ (print_operand): Pass access mode to output_address.
+ * config/mcore/mcore.c (mcore_print_operand_address): Add MODE
+ argument.
+ (mcore_print_operand): Update calls to mcore_print_operand_address.
+ * config/fr30/fr30.c (fr30_print_operand): Pass VOIDmode to
+ output_address.
+ * config/lm32/lm32.c (lm32_print_operand): Pass mode in calls to
+ output_address.
+ * config/tilegx/tilegx.c (output_memory_reference_mode): Remove
+ global.
+ (tilegx_print_operand): Don't set above global. Update calls to
+ output_address.
+ (tilegx_print_operand_address): Add MODE argument. Use instead of
+ output_memory_reference_mode global.
+ * config/frv/frv.c (frv_print_operand_address): Add MODE argument.
+ (frv_print_operand): Pass mode to frv_print_operand_address calls.
+ * config/mn10300/mn10300.c (mn10300_print_operand): Pass mode to
+ output_address.
+ * config/cris/cris.c (cris_print_operand_address): Add MODE
+ argument.
+ (cris_print_operand): Pass mode to output_address calls.
+ * config/spu/spu.c (print_operand): Pass mode to output_address
+ calls.
+ * config/aarch64/aarch64.h (aarch64_print_operand)
+ (aarch64_print_operand_address): Remove prototypes.
+ * config/aarch64/aarch64.c (aarch64_memory_reference_mode): Delete
+ global.
+ (aarch64_print_operand): Make static. Update calls to
+ output_address.
+ (aarch64_print_operand_address): Add MODE argument. Use instead of
+ aarch64_memory_reference_mode global.
+ (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define target
+ hooks.
+ * config/aarch64/aarch64.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS):
+ Delete macro definitions.
+ * config/pa/pa.c (pa_print_operand): Pass mode in output_address
+ calls.
+ * config/xtensa/xtensa.c (print_operand): Pass mode in
+ output_address calls.
+ * config/h8300/h8300.c (h8300_print_operand_address): Add MODE
+ argument.
+ (h83000_print_operand): Update calls to h8300_print_operand_address
+ and output_address.
+ * config/ia64/ia64.c (ia64_print_operand_address): Add MODE
+ argument.
+ * config/tilepro/tilepro.c (output_memory_reference_mode): Delete
+ global.
+ (tilepro_print_operand): Pass mode to output_address.
+ (tilepro_print_operand_address): Add MODE argument. Use instead of
+ output_memory_reference_mode.
+ * config/nvptx/nvptx.c (output_decl_chunk, nvptx_assemble_integer)
+ (nvptx_output_call_insn, nvptx_print_address_operand): Pass VOIDmode
+ to output_address calls.
+ (nvptx_print_operand_address): Add MODE argument.
+ * config/alpha/alpha.c (print_operand): Pass mode argument in
+ output_address calls.
+ * config/m68k/m68k.c (print_operand): Pass mode argument in
+ output_address call.
+ * config/avr/avr.c (avr_print_operand_address): Add MODE argument.
+ (avr_print_operand): Update calls to avr_print_operand_address.
+ * config/sparc/sparc.c (sparc_print_operand_address): Add MODE
+ argument. Update calls to output_address.
+ (sparc_print_operand): Pass mode to output_address.
+ * config/iq2000/iq2000.c (iq2000_print_operand_address): Add MODE
+ argument.
+ (iq2000_print_operand): Pass mode in output_address calls.
+ * config/stormy16/stormy16.c (xstormy16_print_operand_address): Add
+ MODE argument.
+ (xstormy16_print_operand): Pass mode to
+ xstormy16_print_operand_address calls.
+ * config/mips/mips.c (mips_print_operand): Update calls to
+ output_address.
+ (mips_print_operand_address): Add MODE argument.
+ * config/epiphany/epiphany.c (epiphany_print_operand): Update calls
+ to output_address.
+ (epiphany_print_operand_address): Add MODE argument. Add FIXME note.
+ * config/pdp11/pdp11.c (pdp11_asm_print_operand): Update call to
+ output_address.
+ * config/rx/rx.c (rx_print_operand_address): Add MODE argument.
+ (rx_print_operand): Update calls to output_address,
+ rx_print_operand_address.
+ * config/nds32/nds32.c (nds32_print_operand): Update calls to
+ output_address.
+ (nds32_print_operand_address): Add MODE argument.
+ * config/rs6000/rs6000.c (print_operand): Pass mem mode to
+ output_address calls.
+ * config/c6x/c6x.c (print_address_offset): Pass mem mode to
+ output_address call.
+ (c6x_print_address_operand): Update calls to output_address.
+ (c6x_print_operand_address): Pass mode to above.
+ * config/v850/v850.c (v850_print_operand_address): Add MODE
+ argument.
+ (v850_print_operand): Pass mode to v850_print_operand_address,
+ output_address.
+ * config/mmix/mmix.c (mmix_print_operand_address): Add MODE
+ argument.
+ (mmix_print_operand): Pass mode in output_address calls.
+ * config/sh/sh.c (sh_print_operand_address): Add MODE argument.
+ (sh_print_operand): Pass mem mode to output_address,
+ sh_print_operand_address.
+ * config/cr16/cr16.c (cr16_print_operand_address): Add MODE
+ argument.
+ (cr16_print_operand): Pass mode to output_address,
+ cr16_print_operand_address.
+ * config/bfin/bfin.c (print_address_operand): Pass VOIDmode to
+ output_address.
+ * config/microblaze/microblaze.c (print_operand): Pass mode to
+ output_address.
+ * config/nios2/nios2.c (nios2_print_operand): Pass VOIDmode to
+ output_address.
+ (nios2_print_operand_address): Add MODE argument. Update call to
+ nios2_print_operand_address.
+ * config/s390/s390.c (print_operand): Pass mode to output_address.
+ * config/m32c/m32c.c (m32c_print_operand_address): Add MODE
+ argument.
+ * config/arc/arc.c (arc_print_operand): Pass VOIDmode to
+ output_address.
+ * config/arm/arm.c (arm_print_operand_address): Add MODE argument.
+ Use instead of output_memory_reference_mode.
+ (output_memory_reference_mode): Delete global.
+ (arm_print_operand): Pass mem mode to output_address.
+ * config/m32r/m32r.c (m32r_print_operand_address): Add MODE
+ argument.
+ (m32r_print_operand): Pass mode to output_address.
+ * config/msp430/msp430.c (msp430_print_operand_addr): Add MODE
+ argument.
+ (msp430_print_operand): Pass mode to msp430_print_operand_addr.
+ * config/i386/i386.c (ix86_print_operand): Pass mode to
+ output_address calls.
+ (ix86_print_operand_address): Add MODE argument.
+
2015-11-09 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/68251
const_tree, unsigned);
void aarch64_init_expanders (void);
void aarch64_init_simd_builtins (void);
-void aarch64_print_operand (FILE *, rtx, char);
-void aarch64_print_operand_address (FILE *, rtx);
void aarch64_emit_call_insn (rtx);
void aarch64_register_pragmas (void);
void aarch64_relayout_simd_types (void);
{NULL, 0, 0}
};
-/* Used to track the size of an address when generating a pre/post
- increment address. */
-static machine_mode aarch64_memory_reference_mode;
-
typedef enum aarch64_cond_code
{
AARCH64_EQ = 0, AARCH64_NE, AARCH64_CS, AARCH64_CC, AARCH64_MI, AARCH64_PL,
}
-void
-aarch64_print_operand (FILE *f, rtx x, char code)
+static void
+aarch64_print_operand (FILE *f, rtx x, int code)
{
switch (code)
{
break;
case MEM:
- aarch64_memory_reference_mode = GET_MODE (x);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
case CONST:
}
}
-void
-aarch64_print_operand_address (FILE *f, rtx x)
+static void
+aarch64_print_operand_address (FILE *f, machine_mode mode, rtx x)
{
struct aarch64_address_info addr;
- if (aarch64_classify_address (&addr, x, aarch64_memory_reference_mode,
- MEM, true))
+ if (aarch64_classify_address (&addr, x, mode, MEM, true))
switch (addr.type)
{
case ADDRESS_REG_IMM:
{
case PRE_INC:
asm_fprintf (f, "[%s, %d]!", reg_names [REGNO (addr.base)],
- GET_MODE_SIZE (aarch64_memory_reference_mode));
+ GET_MODE_SIZE (mode));
return;
case POST_INC:
asm_fprintf (f, "[%s], %d", reg_names [REGNO (addr.base)],
- GET_MODE_SIZE (aarch64_memory_reference_mode));
+ GET_MODE_SIZE (mode));
return;
case PRE_DEC:
asm_fprintf (f, "[%s, -%d]!", reg_names [REGNO (addr.base)],
- GET_MODE_SIZE (aarch64_memory_reference_mode));
+ GET_MODE_SIZE (mode));
return;
case POST_DEC:
asm_fprintf (f, "[%s], -%d", reg_names [REGNO (addr.base)],
- GET_MODE_SIZE (aarch64_memory_reference_mode));
+ GET_MODE_SIZE (mode));
return;
case PRE_MODIFY:
asm_fprintf (f, "[%s, %wd]!", reg_names [REGNO (addr.base)],
#undef TARGET_USE_PSEUDO_PIC_REG
#define TARGET_USE_PSEUDO_PIC_REG aarch64_use_pseudo_pic_reg
+#undef TARGET_PRINT_OPERAND
+#define TARGET_PRINT_OPERAND aarch64_print_operand
+
+#undef TARGET_PRINT_OPERAND_ADDRESS
+#define TARGET_PRINT_OPERAND_ADDRESS aarch64_print_operand_address
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-aarch64.h"
/* Jump table alignment is explicit in ASM_OUTPUT_CASE_LABEL. */
#define ADDR_VEC_ALIGN(JUMPTABLE) 0
-#define PRINT_OPERAND(STREAM, X, CODE) aarch64_print_operand (STREAM, X, CODE)
-
-#define PRINT_OPERAND_ADDRESS(STREAM, X) \
- aarch64_print_operand_address (STREAM, X)
-
#define MCOUNT_NAME "_mcount"
#define NO_PROFILE_COUNTERS 1
if (REG_P (x))
fprintf (file, "%s", reg_names[REGNO (x)]);
else if (MEM_P (x))
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
else if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == UNSPEC)
{
switch (XINT (XEXP (x, 0), 1))
|| GET_CODE (XEXP (x, 0)) == POST_INC
|| GET_CODE (XEXP (x, 0)) == POST_DEC
|| GET_CODE (XEXP (x, 0)) == POST_MODIFY)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0), 4));
+ output_address (VOIDmode,
+ plus_constant (Pmode, XEXP (XEXP (x, 0), 0), 4));
else if (output_scaled)
{
rtx addr = XEXP (x, 0);
int size = GET_MODE_SIZE (GET_MODE (x));
- output_address (plus_constant (Pmode, XEXP (addr, 0),
+ output_address (VOIDmode,
+ plus_constant (Pmode, XEXP (addr, 0),
((INTVAL (XEXP (addr, 1)) + 4)
>> (size == 2 ? 1 : 2))));
output_scaled = 0;
}
else
- output_address (plus_constant (Pmode, XEXP (x, 0), 4));
+ output_address (VOIDmode,
+ plus_constant (Pmode, XEXP (x, 0), 4));
fputc (']', file);
}
else
switch (GET_CODE (addr))
{
case PRE_INC: case POST_INC:
- output_address (plus_constant (Pmode, XEXP (addr, 0), size)); break;
+ output_address (VOIDmode,
+ plus_constant (Pmode, XEXP (addr, 0), size)); break;
case PRE_DEC: case POST_DEC:
- output_address (plus_constant (Pmode, XEXP (addr, 0), -size));
+ output_address (VOIDmode,
+ plus_constant (Pmode, XEXP (addr, 0), -size));
break;
case PRE_MODIFY: case POST_MODIFY:
- output_address (XEXP (addr, 1)); break;
+ output_address (VOIDmode, XEXP (addr, 1)); break;
case PLUS:
if (output_scaled)
{
- output_address (plus_constant (Pmode, XEXP (addr, 0),
+ output_address (VOIDmode,
+ plus_constant (Pmode, XEXP (addr, 0),
(INTVAL (XEXP (addr, 1))
>> (size == 2 ? 1 : 2))));
output_scaled = 0;
}
else
- output_address (addr);
+ output_address (VOIDmode, addr);
break;
default:
if (flag_pic && CONSTANT_ADDRESS_P (addr))
arc_output_pic_addr_const (file, addr, code);
else
- output_address (addr);
+ output_address (VOIDmode, addr);
break;
}
fputc (']', file);
gcc_assert (GET_CODE (XEXP (c, 0)) == SYMBOL_REF);
gcc_assert (GET_CODE (XEXP (c, 1)) == CONST_INT);
- output_address(XEXP(addr,0));
+ output_address (VOIDmode, XEXP (addr, 0));
break;
}
static unsigned arm_size_return_regs (void);
static bool arm_assemble_integer (rtx, unsigned int, int);
static void arm_print_operand (FILE *, rtx, int);
-static void arm_print_operand_address (FILE *, rtx);
+static void arm_print_operand_address (FILE *, machine_mode, rtx);
static bool arm_print_operand_punct_valid_p (unsigned char code);
static const char *fp_const_from_val (REAL_VALUE_TYPE *);
static arm_cc get_arm_condition_code (rtx);
/* Nonzero if we shouldn't use literal pools. */
bool arm_disable_literal_pool = false;
-/* In case of a PRE_INC, POST_INC, PRE_DEC, POST_DEC memory reference,
- we must report the mode of the memory reference from
- TARGET_PRINT_OPERAND to TARGET_PRINT_OPERAND_ADDRESS. */
-machine_mode output_memory_reference_mode;
-
/* The register number to be used for the PIC offset register. */
unsigned arm_pic_register = INVALID_REGNUM;
break;
case MEM:
- output_memory_reference_mode = GET_MODE (x);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
case CONST_DOUBLE:
\f
/* Target hook for printing a memory address. */
static void
-arm_print_operand_address (FILE *stream, rtx x)
+arm_print_operand_address (FILE *stream, machine_mode mode, rtx x)
{
if (TARGET_32BIT)
{
else if (GET_CODE (x) == PRE_INC || GET_CODE (x) == POST_INC
|| GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_DEC)
{
- extern machine_mode output_memory_reference_mode;
-
gcc_assert (REG_P (XEXP (x, 0)));
if (GET_CODE (x) == PRE_DEC || GET_CODE (x) == PRE_INC)
asm_fprintf (stream, "[%r, #%s%d]!",
REGNO (XEXP (x, 0)),
GET_CODE (x) == PRE_DEC ? "-" : "",
- GET_MODE_SIZE (output_memory_reference_mode));
+ GET_MODE_SIZE (mode));
else
asm_fprintf (stream, "[%r], #%s%d",
REGNO (XEXP (x, 0)),
GET_CODE (x) == POST_DEC ? "-" : "",
- GET_MODE_SIZE (output_memory_reference_mode));
+ GET_MODE_SIZE (mode));
}
else if (GET_CODE (x) == PRE_MODIFY)
{
/* Output ADDR to FILE as address. */
static void
-avr_print_operand_address (FILE *file, rtx addr)
+avr_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
{
switch (GET_CODE (addr))
{
if (GET_CODE (addr) != PLUS)
fatal_insn ("bad address, not (reg+disp):", addr);
- avr_print_operand_address (file, XEXP (addr, 0));
+ avr_print_operand_address (file, VOIDmode, XEXP (addr, 0));
}
else if (code == 'p' || code == 'r')
{
fatal_insn ("bad address, not post_inc or pre_dec:", addr);
if (code == 'p')
- avr_print_operand_address (file, XEXP (addr, 0)); /* X, Y, Z */
+ /* X, Y, Z */
+ avr_print_operand_address (file, VOIDmode, XEXP (addr, 0));
else
avr_print_operand (file, XEXP (addr, 0), 0); /* r26, r28, r30 */
}
else if (GET_CODE (addr) == PLUS)
{
- avr_print_operand_address (file, XEXP (addr,0));
+ avr_print_operand_address (file, VOIDmode, XEXP (addr,0));
if (REGNO (XEXP (addr, 0)) == REG_X)
fatal_insn ("internal compiler error. Bad address:"
,addr);
avr_print_operand (file, XEXP (addr,1), code);
}
else
- avr_print_operand_address (file, addr);
+ avr_print_operand_address (file, VOIDmode, addr);
}
else if (code == 'i')
{
if (GET_CODE (x) == SYMBOL_REF && (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO))
avr_print_operand_address
- (file, plus_constant (HImode, x, -avr_arch->sfr_offset));
+ (file, VOIDmode, plus_constant (HImode, x, -avr_arch->sfr_offset));
else
fatal_insn ("bad address, not an I/O address:", x);
}
else if (code == 'k')
fputs (cond_string (reverse_condition (GET_CODE (x))), file);
else
- avr_print_operand_address (file, x);
+ avr_print_operand_address (file, VOIDmode, x);
}
switch (GET_CODE (x))
{
case PLUS:
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
fprintf (file, "+");
- output_address (XEXP (x, 1));
+ output_address (VOIDmode, XEXP (x, 1));
break;
case PRE_DEC:
fprintf (file, "--");
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
break;
case POST_INC:
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
fprintf (file, "++");
break;
case POST_DEC:
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
fprintf (file, "--");
break;
}
}
fputs ("(", file);
- output_address (off);
+ output_address (mem_mode, off);
fputs (")", file);
}
case PRE_MODIFY:
case POST_MODIFY:
if (GET_CODE (x) == POST_MODIFY)
- output_address (XEXP (x, 0));
+ output_address (mem_mode, XEXP (x, 0));
off = XEXP (XEXP (x, 1), 1);
if (XEXP (x, 0) == stack_pointer_rtx)
{
else
fprintf (file, "++");
if (GET_CODE (x) == PRE_MODIFY)
- output_address (XEXP (x, 0));
+ output_address (mem_mode, XEXP (x, 0));
print_address_offset (file, off, mem_mode);
break;
}
else
fprintf (file, "+");
- output_address (XEXP (x, 0));
+ output_address (mem_mode, XEXP (x, 0));
print_address_offset (file, off, mem_mode);
break;
case PRE_DEC:
gcc_assert (XEXP (x, 0) != stack_pointer_rtx);
fprintf (file, "--");
- output_address (XEXP (x, 0));
+ output_address (mem_mode, XEXP (x, 0));
fprintf (file, "[1]");
break;
case PRE_INC:
fprintf (file, "++");
- output_address (XEXP (x, 0));
+ output_address (mem_mode, XEXP (x, 0));
fprintf (file, "[1]");
break;
case POST_INC:
gcc_assert (XEXP (x, 0) != stack_pointer_rtx);
- output_address (XEXP (x, 0));
+ output_address (mem_mode, XEXP (x, 0));
fprintf (file, "++[1]");
break;
case POST_DEC:
- output_address (XEXP (x, 0));
+ output_address (mem_mode, XEXP (x, 0));
fprintf (file, "--[1]");
break;
/* Output assembly language output for the address ADDR to FILE. */
static void
-c6x_print_operand_address (FILE *file, rtx addr)
+c6x_print_operand_address (FILE *file, machine_mode mode, rtx addr)
{
- c6x_print_address_operand (file, addr, VOIDmode);
+ c6x_print_address_operand (file, addr, mode);
}
/* Print an operand, X, to FILE, with an optional modifier in CODE.
/* TARGETM Function Prototypes and forward declarations */
static void cr16_print_operand (FILE *, rtx, int);
-static void cr16_print_operand_address (FILE *, rtx);
+static void cr16_print_operand_address (FILE *, machine_mode, rtx);
/* Stack layout and calling conventions. */
#undef TARGET_STRUCT_VALUE_RTX
return;
case MEM:
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
return;
case CONST_DOUBLE:
{
putc ('$', file);
}
- cr16_print_operand_address (file, x);
+ cr16_print_operand_address (file, VOIDmode, x);
return;
}
default:
/* Implements the macro PRINT_OPERAND_ADDRESS defined in cr16.h. */
static void
-cr16_print_operand_address (FILE * file, rtx addr)
+cr16_print_operand_address (FILE * file, machine_mode /*mode*/, rtx addr)
{
enum cr16_addrtype addrtype;
struct cr16_address address;
static void cris_print_operand (FILE *, rtx, int);
-static void cris_print_operand_address (FILE *, rtx);
+static void cris_print_operand_address (FILE *, machine_mode, rtx);
static bool cris_print_operand_punct_valid_p (unsigned char code);
return;
}
}
- output_address (addr);
+ output_address (VOIDmode, addr);
}
return;
adj_mem
= adjust_address (adj_mem, GET_MODE (adj_mem), size / 2);
- output_address (XEXP (adj_mem, 0));
+ output_address (VOIDmode, XEXP (adj_mem, 0));
return;
}
return;
case MEM:
- output_address (XEXP (operand, 0));
+ output_address (GET_MODE (operand), XEXP (operand, 0));
return;
case CONST_DOUBLE:
/* The PRINT_OPERAND_ADDRESS worker. */
static void
-cris_print_operand_address (FILE *file, rtx x)
+cris_print_operand_address (FILE *file, machine_mode /*mode*/, rtx x)
{
/* All these were inside MEM:s so output indirection characters. */
putc ('[', file);
offset = 0;
break;
}
- output_address (addr);
+ output_address (GET_MODE (x), addr);
fputc (']', file);
if (offset)
{
case 1:
break;
}
- output_address (offset);
+ output_address (GET_MODE (x), offset);
}
break;
case CONST_DOUBLE :
/* Print a memory address as an operand to reference that memory location. */
static void
-epiphany_print_operand_address (FILE *file, rtx addr)
+epiphany_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
{
register rtx base, index = 0;
int offset = 0;
break;
case PRE_INC: case PRE_DEC: case POST_INC: case POST_DEC: case POST_MODIFY:
/* We shouldn't get here as we've lost the mode of the memory object
- (which says how much to inc/dec by. */
+ (which says how much to inc/dec by.
+ FIXME: We have the mode now, address printing can be moved into this
+ function. */
gcc_unreachable ();
break;
default:
break;
case SYMBOL_REF:
- output_address (x0);
+ output_address (VOIDmode, x0);
break;
default:
static int frv_string_begins_with (const char *, const char *);
static FRV_INLINE bool frv_small_data_reloc_p (rtx, int);
static void frv_print_operand (FILE *, rtx, int);
-static void frv_print_operand_address (FILE *, rtx);
+static void frv_print_operand_address (FILE *, machine_mode, rtx);
static bool frv_print_operand_punct_valid_p (unsigned char code);
static void frv_print_operand_memory_reference_reg
(FILE *, rtx);
\f
/* Print a memory address as an operand to reference that memory location. */
static void
-frv_print_operand_address (FILE * stream, rtx x)
+frv_print_operand_address (FILE * stream, machine_mode /* mode */, rtx x)
{
if (GET_CODE (x) == MEM)
x = XEXP (x, 0);
frv_output_const_unspec (file, &unspec);
else if (GET_CODE (x) == MEM)
- frv_print_operand_address (file, XEXP (x, 0));
+ frv_print_operand_address (file, GET_MODE (x), XEXP (x, 0));
else if (CONSTANT_ADDRESS_P (x))
- frv_print_operand_address (file, x);
+ frv_print_operand_address (file, VOIDmode, x);
else
fatal_insn ("bad insn in frv_print_operand, 0 case", x);
static tree h8300_handle_fndecl_attribute (tree *, tree, tree, int, bool *);
static tree h8300_handle_eightbit_data_attribute (tree *, tree, tree, int, bool *);
static tree h8300_handle_tiny_data_attribute (tree *, tree, tree, int, bool *);
-static void h8300_print_operand_address (FILE *, rtx);
+static void h8300_print_operand_address (FILE *, machine_mode, rtx);
static void h8300_print_operand (FILE *, rtx, int);
static bool h8300_print_operand_punct_valid_p (unsigned char code);
#ifndef OBJECT_FORMAT_ELF
}
break;
case 'o':
- h8300_print_operand_address (file, x);
+ h8300_print_operand_address (file, VOIDmode, x);
break;
case 's':
if (GET_CODE (x) == CONST_INT)
rtx addr = XEXP (x, 0);
fprintf (file, "@");
- output_address (addr);
+ output_address (GET_MODE (x), addr);
/* Add a length suffix to constant addresses. Although this
is often unnecessary, it helps to avoid ambiguity in the
case CONST:
case LABEL_REF:
fprintf (file, "#");
- h8300_print_operand_address (file, x);
+ h8300_print_operand_address (file, VOIDmode, x);
break;
case CONST_DOUBLE:
{
/* Output assembly language output for the address ADDR to FILE. */
static void
-h8300_print_operand_address (FILE *file, rtx addr)
+h8300_print_operand_address (FILE *file, machine_mode mode, rtx addr)
{
rtx index;
int size;
if (GET_CODE (index) == REG)
{
/* reg,foo */
- h8300_print_operand_address (file, XEXP (addr, 1));
+ h8300_print_operand_address (file, mode, XEXP (addr, 1));
fprintf (file, ",");
switch (size)
{
case 0:
- h8300_print_operand_address (file, index);
+ h8300_print_operand_address (file, mode, index);
break;
case 1:
else
{
/* foo+k */
- h8300_print_operand_address (file, XEXP (addr, 0));
+ h8300_print_operand_address (file, mode, XEXP (addr, 0));
fprintf (file, "+");
- h8300_print_operand_address (file, XEXP (addr, 1));
+ h8300_print_operand_address (file, mode, XEXP (addr, 1));
}
fprintf (file, ")");
break;
if (TARGET_64BIT)
x = gen_rtx_UNSPEC (DImode, gen_rtvec (1, x), UNSPEC_LEA_ADDR);
- output_address (x);
+ output_address (VOIDmode, x);
return;
case 'L':
}
static void
-ix86_print_operand_address (FILE *file, rtx addr)
+ix86_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
{
ix86_print_operand_address_as (file, addr, ADDR_SPACE_GENERIC);
}
static void ia64_output_function_end_prologue (FILE *);
static void ia64_print_operand (FILE *, rtx, int);
-static void ia64_print_operand_address (FILE *, rtx);
+static void ia64_print_operand_address (FILE *, machine_mode, rtx);
static bool ia64_print_operand_punct_valid_p (unsigned char code);
static int ia64_issue_rate (void);
static void
ia64_print_operand_address (FILE * stream ATTRIBUTE_UNUSED,
+ machine_mode /*mode*/,
rtx address ATTRIBUTE_UNUSED)
{
}
static rtx iq2000_function_value (const_tree, const_tree, bool);
static rtx iq2000_libcall_value (machine_mode, const_rtx);
static void iq2000_print_operand (FILE *, rtx, int);
-static void iq2000_print_operand_address (FILE *, rtx);
+static void iq2000_print_operand_address (FILE *, machine_mode, rtx);
static bool iq2000_print_operand_punct_valid_p (unsigned char code);
#undef TARGET_INIT_BUILTINS
reference whose address is ADDR. ADDR is an RTL expression. */
static void
-iq2000_print_operand_address (FILE * file, rtx addr)
+iq2000_print_operand_address (FILE * file, machine_mode mode, rtx addr)
{
if (!addr)
error ("PRINT_OPERAND_ADDRESS, null pointer");
"PRINT_OPERAND_ADDRESS, LO_SUM with #1 not REG.");
fprintf (file, "%%lo(");
- iq2000_print_operand_address (file, arg1);
+ iq2000_print_operand_address (file, mode, arg1);
fprintf (file, ")(%s)", reg_names [REGNO (arg0)]);
}
break;
else if (code == MEM)
{
+ machine_mode mode = GET_MODE (op);
+
if (letter == 'D')
- output_address (plus_constant (Pmode, XEXP (op, 0), 4));
+ output_address (mode, plus_constant (Pmode, XEXP (op, 0), 4));
else
- output_address (XEXP (op, 0));
+ output_address (mode, XEXP (op, 0));
}
else if (code == CONST_DOUBLE
else if (code == HIGH)
output_addr_const (file, XEXP (op, 0));
else if (code == MEM)
- output_address (XEXP (op, 0));
+ output_address (GET_MODE (op), XEXP (op, 0));
else if (letter == 'z' && GET_CODE (op) == CONST_INT && INTVAL (op) == 0)
fprintf (file, "%s", reg_names[0]);
else if (GET_CODE (op) == CONST_DOUBLE)
break;
case MEM:
- output_address (XEXP (addr, 0));
+ output_address (VOIDmode, XEXP (addr, 0));
break;
case PLUS:
#define TARGET_PRINT_OPERAND_ADDRESS m32c_print_operand_address
static void
-m32c_print_operand_address (FILE * stream, rtx address)
+m32c_print_operand_address (FILE * stream, machine_mode /*mode*/, rtx address)
{
if (GET_CODE (address) == MEM)
address = XEXP (address, 0);
static bool m32r_mode_dependent_address_p (const_rtx, addr_space_t);
static tree m32r_handle_model_attribute (tree *, tree, tree, int, bool *);
static void m32r_print_operand (FILE *, rtx, int);
-static void m32r_print_operand_address (FILE *, rtx);
+static void m32r_print_operand_address (FILE *, machine_mode, rtx);
static bool m32r_print_operand_punct_valid_p (unsigned char code);
static void m32r_output_function_prologue (FILE *, HOST_WIDE_INT);
static void m32r_output_function_epilogue (FILE *, HOST_WIDE_INT);
fputs (reg_names[REGNO (x)+1], file);
else if (MEM_P (x))
{
+ machine_mode mode = GET_MODE (x);
+
fprintf (file, "@(");
/* Handle possible auto-increment. Since it is pre-increment and
we have already done it, we can just use an offset of four. */
currently necessary, but keep it around. */
if (GET_CODE (XEXP (x, 0)) == PRE_INC
|| GET_CODE (XEXP (x, 0)) == PRE_DEC)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0), 4));
+ output_address (mode, plus_constant (Pmode,
+ XEXP (XEXP (x, 0), 0), 4));
else
- output_address (plus_constant (Pmode, XEXP (x, 0), 4));
+ output_address (mode, plus_constant (Pmode, XEXP (x, 0), 4));
fputc (')', file);
}
else
else
{
fputs ("@(", file);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), addr);
fputc (')', file);
}
break;
/* Print a memory address as an operand to reference that memory location. */
static void
-m32r_print_operand_address (FILE * file, rtx addr)
+m32r_print_operand_address (FILE * file, machine_mode /*mode*/, rtx addr)
{
rtx base;
rtx index = 0;
}
else if (GET_CODE (op) == MEM)
{
- output_address (XEXP (op, 0));
+ output_address (GET_MODE (op), XEXP (op, 0));
if (letter == 'd' && ! TARGET_68020
&& CONSTANT_ADDRESS_P (XEXP (op, 0))
&& !(GET_CODE (XEXP (op, 0)) == CONST_INT
unsigned int, tree);
#endif
static void mcore_print_operand (FILE *, rtx, int);
-static void mcore_print_operand_address (FILE *, rtx);
+static void mcore_print_operand_address (FILE *, machine_mode, rtx);
static bool mcore_print_operand_punct_valid_p (unsigned char code);
static void mcore_unique_section (tree, int);
static void mcore_encode_section_info (tree, rtx, int);
/* Print the operand address in x to the stream. */
static void
-mcore_print_operand_address (FILE * stream, rtx x)
+mcore_print_operand_address (FILE * stream, machine_mode /*mode*/, rtx x)
{
switch (GET_CODE (x))
{
break;
case MEM:
mcore_print_operand_address
- (stream, XEXP (adjust_address (x, SImode, 4), 0));
+ (stream, GET_MODE (x), XEXP (adjust_address (x, SImode, 4), 0));
break;
default:
gcc_unreachable ();
fputs (reg_names[REGNO (x)], (stream));
break;
case MEM:
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
default:
output_addr_const (stream, x);
if (letter == 'o')
{
rtx op4 = adjust_address (op, GET_MODE (op), 4);
- output_address (XEXP (op4, 0));
+ output_address (GET_MODE (op), XEXP (op4, 0));
}
else if (letter == 'y')
{
}
}
else
- output_address (XEXP (op, 0));
+ output_address (GET_MODE (op), XEXP (op, 0));
else if (letter == 'h' || letter == 'j')
{
case MEM:
if (letter == 'D')
- output_address (plus_constant (Pmode, XEXP (op, 0), 4));
+ output_address (GET_MODE (op), plus_constant (Pmode,
+ XEXP (op, 0), 4));
else if (letter == 'b')
{
gcc_assert (REG_P (XEXP (op, 0)));
else if (letter && letter != 'z')
output_operand_lossage ("invalid use of '%%%c'", letter);
else
- output_address (XEXP (op, 0));
+ output_address (GET_MODE (op), XEXP (op, 0));
break;
default:
/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
static void
-mips_print_operand_address (FILE *file, rtx x)
+mips_print_operand_address (FILE *file, machine_mode /*mode*/, rtx x)
{
struct mips_address_info addr;
static void mmix_asm_trampoline_template (FILE *);
static void mmix_trampoline_init (rtx, tree, rtx);
static void mmix_print_operand (FILE *, rtx, int);
-static void mmix_print_operand_address (FILE *, rtx);
+static void mmix_print_operand_address (FILE *, machine_mode, rtx);
static bool mmix_print_operand_punct_valid_p (unsigned char);
static void mmix_conditional_register_usage (void);
return;
case MEM:
- output_address (XEXP (modified_x, 0));
+ output_address (GET_MODE (modified_x), XEXP (modified_x, 0));
return;
case CONST_INT:
/* TARGET_PRINT_OPERAND_ADDRESS. */
static void
-mmix_print_operand_address (FILE *stream, rtx x)
+mmix_print_operand_address (FILE *stream, machine_mode /*mode*/, rtx x)
{
if (REG_P (x))
{
{
case MEM:
fputc ('(', file);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
fputc (')', file);
break;
{
case MEM:
fputc ('(', file);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
fputc (')', file);
break;
case MEM:
fputc ('(', file);
x = adjust_address (x, SImode, 4);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
fputc (')', file);
break;
case 'A':
fputc ('(', file);
if (REG_P (XEXP (x, 0)))
- output_address (gen_rtx_PLUS (SImode, XEXP (x, 0), const0_rtx));
+ output_address (VOIDmode, gen_rtx_PLUS (SImode,
+ XEXP (x, 0), const0_rtx));
else
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
fputc (')', file);
break;
{
case MEM:
fputc ('(', file);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
fputc (')', file);
break;
case PLUS:
- output_address (x);
+ output_address (VOIDmode, x);
break;
case REG:
is ADDR. */
static void
-msp430_print_operand_addr (FILE * file, rtx addr)
+msp430_print_operand_addr (FILE * file, machine_mode /*mode*/, rtx addr)
{
switch (GET_CODE (addr))
{
case MEM:
addr = XEXP (op, 0);
- msp430_print_operand_addr (file, addr);
+ msp430_print_operand_addr (file, GET_MODE (op), addr);
break;
case CONST:
break;
case MEM:
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
case CODE_LABEL:
}
static void
-nds32_print_operand_address (FILE *stream, rtx x)
+nds32_print_operand_address (FILE *stream, machine_mode /*mode*/, rtx x)
{
rtx op0, op1;
}
if (letter == 0)
{
- output_address (op);
+ output_address (VOIDmode, op);
return;
}
break;
/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
static void
-nios2_print_operand_address (FILE *file, rtx op)
+nios2_print_operand_address (FILE *file, machine_mode mode, rtx op)
{
switch (GET_CODE (op))
{
case MEM:
{
rtx base = XEXP (op, 0);
- nios2_print_operand_address (file, base);
+ nios2_print_operand_address (file, mode, base);
return;
}
default:
output_decl_chunk (void)
{
begin_decl_field ();
- output_address (gen_int_mode (init_part, decl_chunk_mode));
+ output_address (VOIDmode, gen_int_mode (init_part, decl_chunk_mode));
init_part = 0;
}
{
nvptx_record_needed_fndecl (SYMBOL_REF_DECL (x));
fprintf (asm_out_file, "generic(");
- output_address (x);
+ output_address (VOIDmode, x);
fprintf (asm_out_file, ")");
}
if (off != 0)
assemble_name (asm_out_file, name);
}
else
- output_address (callee);
+ output_address (VOIDmode, callee);
if (arg_end > 1 || (decl && DECL_STATIC_CHAIN (decl)))
{
{
case PLUS:
off = XEXP (x, 1);
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
fprintf (file, "+");
- output_address (off);
+ output_address (VOIDmode, off);
break;
case SYMBOL_REF:
/* Write assembly language output for the address ADDR to FILE. */
static void
-nvptx_print_operand_address (FILE *file, rtx addr)
+nvptx_print_operand_address (FILE *file, machine_mode mode, rtx addr)
{
- nvptx_print_address_operand (file, addr, VOIDmode);
+ nvptx_print_address_operand (file, addr, mode);
}
/* Print an operand, X, to FILE, with an optional modifier in CODE.
reg_names [REGNO (index)], reg_names [REGNO (base)]);
}
else
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
default:
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
}
}
else if (GET_CODE (x) == REG)
fprintf (file, "%s", reg_names[REGNO (x)]);
else if (GET_CODE (x) == MEM)
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != SImode)
{
REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), sval);
fputs (reg_names[REGNO (x) + 1], file);
else if (MEM_P (x))
{
+ machine_mode mode = GET_MODE (x);
/* Handle possible auto-increment. Since it is pre-increment and
we have already done it, we can just use an offset of word. */
if (GET_CODE (XEXP (x, 0)) == PRE_INC
|| GET_CODE (XEXP (x, 0)) == PRE_DEC)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0),
- UNITS_PER_WORD));
+ output_address (mode, plus_constant (Pmode, XEXP (XEXP (x, 0), 0),
+ UNITS_PER_WORD));
else if (GET_CODE (XEXP (x, 0)) == PRE_MODIFY)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0),
- UNITS_PER_WORD));
+ output_address (mode, plus_constant (Pmode, XEXP (XEXP (x, 0), 0),
+ UNITS_PER_WORD));
else
- output_address (XEXP (adjust_address_nv (x, SImode,
- UNITS_PER_WORD),
+ output_address (mode, XEXP (adjust_address_nv (x, SImode,
+ UNITS_PER_WORD),
0));
if (small_data_operand (x, GET_MODE (x)))
fputs (reg_names[REGNO (x) + 2], file);
else if (MEM_P (x))
{
+ machine_mode mode = GET_MODE (x);
if (GET_CODE (XEXP (x, 0)) == PRE_INC
|| GET_CODE (XEXP (x, 0)) == PRE_DEC)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0), 8));
+ output_address (mode, plus_constant (Pmode,
+ XEXP (XEXP (x, 0), 0), 8));
else if (GET_CODE (XEXP (x, 0)) == PRE_MODIFY)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0), 8));
+ output_address (mode, plus_constant (Pmode,
+ XEXP (XEXP (x, 0), 0), 8));
else
- output_address (XEXP (adjust_address_nv (x, SImode, 8), 0));
+ output_address (mode, XEXP (adjust_address_nv (x, SImode, 8), 0));
if (small_data_operand (x, GET_MODE (x)))
fprintf (file, "@%s(%s)", SMALL_DATA_RELOC,
reg_names[SMALL_DATA_REG]);
fputs (reg_names[REGNO (x) + 3], file);
else if (MEM_P (x))
{
+ machine_mode mode = GET_MODE (x);
if (GET_CODE (XEXP (x, 0)) == PRE_INC
|| GET_CODE (XEXP (x, 0)) == PRE_DEC)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0), 12));
+ output_address (mode, plus_constant (Pmode,
+ XEXP (XEXP (x, 0), 0), 12));
else if (GET_CODE (XEXP (x, 0)) == PRE_MODIFY)
- output_address (plus_constant (Pmode, XEXP (XEXP (x, 0), 0), 12));
+ output_address (mode, plus_constant (Pmode,
+ XEXP (XEXP (x, 0), 0), 12));
else
- output_address (XEXP (adjust_address_nv (x, SImode, 12), 0));
+ output_address (mode, XEXP (adjust_address_nv (x, SImode, 12), 0));
if (small_data_operand (x, GET_MODE (x)))
fprintf (file, "@%s(%s)", SMALL_DATA_RELOC,
reg_names[SMALL_DATA_REG]);
fprintf (file, "%d(%s)", - GET_MODE_SIZE (GET_MODE (x)),
reg_names[REGNO (XEXP (XEXP (x, 0), 0))]);
else if (GET_CODE (XEXP (x, 0)) == PRE_MODIFY)
- output_address (XEXP (XEXP (x, 0), 1));
+ output_address (GET_MODE (x), XEXP (XEXP (x, 0), 1));
else
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
}
else
{
reference whose address is ADDR. */
static void
-rx_print_operand_address (FILE * file, rtx addr)
+rx_print_operand_address (FILE * file, machine_mode /*mode*/, rtx addr)
{
switch (GET_CODE (addr))
{
case MEM:
if (! WORDS_BIG_ENDIAN)
op = adjust_address (op, SImode, 4);
- output_address (XEXP (op, 0));
+ output_address (GET_MODE (op), XEXP (op, 0));
break;
default:
gcc_unreachable ();
case MEM:
if (WORDS_BIG_ENDIAN)
op = adjust_address (op, SImode, 4);
- output_address (XEXP (op, 0));
+ output_address (GET_MODE (op), XEXP (op, 0));
break;
default:
gcc_unreachable ();
}
case MEM:
- output_address (XEXP (op, 0));
+ output_address (GET_MODE (op), XEXP (op, 0));
break;
case PLUS:
- output_address (op);
+ output_address (VOIDmode, op);
break;
case REG:
case SYMBOL_REF:
case LABEL_REF:
case CODE_LABEL:
- rx_print_operand_address (file, op);
+ rx_print_operand_address (file, VOIDmode, op);
break;
default:
break;
case MEM:
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
case CONST:
static tree sh_handle_trap_exit_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_renesas_attribute (tree *, tree, tree, int, bool *);
static void sh_print_operand (FILE *, rtx, int);
-static void sh_print_operand_address (FILE *, rtx);
+static void sh_print_operand_address (FILE *, machine_mode, rtx);
static bool sh_print_operand_punct_valid_p (unsigned char code);
static bool sh_asm_output_addr_const_extra (FILE *file, rtx x);
static void sh_output_function_epilogue (FILE *, HOST_WIDE_INT);
\f
/* Print the operand address in x to the stream. */
static void
-sh_print_operand_address (FILE *stream, rtx x)
+sh_print_operand_address (FILE *stream, machine_mode /*mode*/, rtx x)
{
switch (GET_CODE (x))
{
else if (MEM_P (x))
{
x = adjust_address (x, SImode, 4 * SH_REG_LSW_OFFSET);
- sh_print_operand_address (stream, XEXP (x, 0));
+ sh_print_operand_address (stream, GET_MODE (x), XEXP (x, 0));
}
else
{
else if (MEM_P (x))
{
x = adjust_address (x, SImode, 4 * SH_REG_MSW_OFFSET);
- sh_print_operand_address (stream, XEXP (x, 0));
+ sh_print_operand_address (stream, GET_MODE (x), XEXP (x, 0));
}
else
{
fputs (reg_names[REGNO (x) + 1], (stream));
break;
case MEM:
- if (GET_CODE (XEXP (x, 0)) != PRE_DEC
- && GET_CODE (XEXP (x, 0)) != POST_INC)
- x = adjust_address (x, SImode, 4);
- sh_print_operand_address (stream, XEXP (x, 0));
+ {
+ machine_mode mode = GET_MODE (x);
+ if (GET_CODE (XEXP (x, 0)) != PRE_DEC
+ && GET_CODE (XEXP (x, 0)) != POST_INC)
+ x = adjust_address (x, SImode, 4);
+ sh_print_operand_address (stream, mode, XEXP (x, 0));
+ }
break;
default:
break;
break;
case MEM:
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
default:
static reg_class_t sparc_preferred_reload_class (rtx x, reg_class_t rclass);
static bool sparc_print_operand_punct_valid_p (unsigned char);
static void sparc_print_operand (FILE *, rtx, int);
-static void sparc_print_operand_address (FILE *, rtx);
+static void sparc_print_operand_address (FILE *, machine_mode, rtx);
static reg_class_t sparc_secondary_reload (bool, rtx, reg_class_t,
machine_mode,
secondary_reload_info *);
return;
case 'm':
/* Print the operand's address only. */
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
return;
case 'r':
/* In this case we need a register. Use %g0 if the
/* Operand must be a MEM; write its address. */
if (GET_CODE (x) != MEM)
output_operand_lossage ("invalid %%f operand");
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
return;
case 's':
/* Poor Sun assembler doesn't understand absolute addressing. */
if (CONSTANT_P (XEXP (x, 0)))
fputs ("%g0+", file);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
fputc (']', file);
}
else if (GET_CODE (x) == HIGH)
/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
static void
-sparc_print_operand_address (FILE *file, rtx x)
+sparc_print_operand_address (FILE *file, machine_mode /*mode*/, rtx x)
{
register rtx base, index = 0;
int offset = 0;
&& ! TARGET_CM_MEDMID);
output_operand (XEXP (base, 0), 0);
fputs ("+%lo(", file);
- output_address (XEXP (base, 1));
+ output_address (VOIDmode, XEXP (base, 1));
fprintf (file, ")+%d", offset);
}
else
fputs ("+%l44(", file);
else
fputs ("+%lo(", file);
- output_address (XEXP (addr, 1));
+ output_address (VOIDmode, XEXP (addr, 1));
fputc (')', file);
}
else if (flag_pic
/* Used in indirect function calls. */
fprintf (file, "%s", reg_names[REGNO (XEXP (x, 0))]);
else
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
}
return;
if (xcode == REG)
fprintf (file, "%s", reg_names[REGNO (x)]);
else if (xcode == MEM)
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
else if (xcode == CONST_VECTOR)
print_operand (file, CONST_VECTOR_ELT (x, 0), 0);
else
Print a memory address as an operand to reference that memory location. */
static void
-xstormy16_print_operand_address (FILE *file, rtx address)
+xstormy16_print_operand_address (FILE *file, machine_mode /*mode*/,
+ rtx address)
{
HOST_WIDE_INT offset;
int pre_dec, post_inc;
else if (LABEL_P (x))
output_asm_label (x);
else
- xstormy16_print_operand_address (file, x);
+ xstormy16_print_operand_address (file, VOIDmode, x);
return;
case 'o':
break;
case MEM:
- xstormy16_print_operand_address (file, XEXP (x, 0));
+ xstormy16_print_operand_address (file, GET_MODE (x), XEXP (x, 0));
break;
default:
/* SYMBOL_REF for GOT */
static GTY(()) rtx g_got_symbol = NULL;
-/* In case of a POST_INC or POST_DEC memory reference, we must report
- the mode of the memory reference from TARGET_PRINT_OPERAND to
- TARGET_PRINT_OPERAND_ADDRESS. */
-static machine_mode output_memory_reference_mode;
-
/* Report whether we're printing out the first address fragment of a
POST_INC or POST_DEC memory reference, from TARGET_PRINT_OPERAND to
TARGET_PRINT_OPERAND_ADDRESS. */
return;
}
- output_memory_reference_mode = GET_MODE (x);
output_memory_autoinc_first = true;
- output_address (XEXP (x, 0));
- output_memory_reference_mode = VOIDmode;
+ output_address (GET_MODE (x), XEXP (x, 0));
return;
case 'i':
return;
}
- output_memory_reference_mode = GET_MODE (x);
output_memory_autoinc_first = false;
- output_address (XEXP (x, 0));
- output_memory_reference_mode = VOIDmode;
+ output_address (GET_MODE (x), XEXP (x, 0));
return;
case 'j':
}
else if (MEM_P (x))
{
- output_memory_reference_mode = VOIDmode;
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
return;
}
else
/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
static void
-tilegx_print_operand_address (FILE *file, rtx addr)
+tilegx_print_operand_address (FILE *file, machine_mode mode, rtx addr)
{
if (GET_CODE (addr) == POST_DEC
|| GET_CODE (addr) == POST_INC)
{
- int offset = GET_MODE_SIZE (output_memory_reference_mode);
+ int offset = GET_MODE_SIZE (mode);
- gcc_assert (output_memory_reference_mode != VOIDmode);
+ gcc_assert (mode != VOIDmode);
if (output_memory_autoinc_first)
fprintf (file, "%s", reg_names[REGNO (XEXP (addr, 0))]);
}
else if (GET_CODE (addr) == POST_MODIFY)
{
- gcc_assert (output_memory_reference_mode != VOIDmode);
+ gcc_assert (mode != VOIDmode);
gcc_assert (GET_CODE (XEXP (addr, 1)) == PLUS);
/* SYMBOL_REF for GOT */
static GTY(()) rtx g_got_symbol = NULL;
-/* In case of a POST_INC or POST_DEC memory reference, we must report
- the mode of the memory reference from TARGET_PRINT_OPERAND to
- TARGET_PRINT_OPERAND_ADDRESS. */
-static machine_mode output_memory_reference_mode;
-
/* Report whether we're printing out the first address fragment of a
POST_INC or POST_DEC memory reference, from TARGET_PRINT_OPERAND to
TARGET_PRINT_OPERAND_ADDRESS. */
return;
}
- output_memory_reference_mode = GET_MODE (x);
output_memory_autoinc_first = true;
- output_address (XEXP (x, 0));
- output_memory_reference_mode = VOIDmode;
+ output_address (GET_MODE (x), XEXP (x, 0));
return;
case 'i':
return;
}
- output_memory_reference_mode = GET_MODE (x);
output_memory_autoinc_first = false;
- output_address (XEXP (x, 0));
- output_memory_reference_mode = VOIDmode;
+ output_address (GET_MODE (x), XEXP (x, 0));
return;
case 'j':
}
else if (MEM_P (x))
{
- output_memory_reference_mode = VOIDmode;
- output_address (XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
return;
}
else
/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
static void
-tilepro_print_operand_address (FILE *file, rtx addr)
+tilepro_print_operand_address (FILE *file, machine_mode mode, rtx addr)
{
if (GET_CODE (addr) == POST_DEC
|| GET_CODE (addr) == POST_INC)
{
- int offset = GET_MODE_SIZE (output_memory_reference_mode);
+ int offset = GET_MODE_SIZE (mode);
- gcc_assert (output_memory_reference_mode != VOIDmode);
+ gcc_assert (mode != VOIDmode);
if (output_memory_autoinc_first)
fprintf (file, "%s", reg_names[REGNO (XEXP (addr, 0))]);
}
else if (GET_CODE (addr) == POST_MODIFY)
{
- gcc_assert (output_memory_reference_mode != VOIDmode);
+ gcc_assert (mode != VOIDmode);
gcc_assert (GET_CODE (XEXP (addr, 1)) == PLUS);
#define streq(a,b) (strcmp (a, b) == 0)
#endif
-static void v850_print_operand_address (FILE *, rtx);
+static void v850_print_operand_address (FILE *, machine_mode, rtx);
/* Names of the various data areas used on the v850. */
const char * GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
fprintf (file, reg_names[REGNO (x) + 1]);
break;
case MEM:
- x = XEXP (adjust_address (x, SImode, 4), 0);
- v850_print_operand_address (file, x);
- if (GET_CODE (x) == CONST_INT)
- fprintf (file, "[r0]");
+ {
+ machine_mode mode = GET_MODE (x);
+ x = XEXP (adjust_address (x, SImode, 4), 0);
+ v850_print_operand_address (file, mode, x);
+ if (GET_CODE (x) == CONST_INT)
+ fprintf (file, "[r0]");
+ }
break;
case CONST_INT:
{
case MEM:
if (GET_CODE (XEXP (x, 0)) == CONST_INT)
- output_address (gen_rtx_PLUS (SImode, gen_rtx_REG (SImode, 0),
+ output_address (GET_MODE (x),
+ gen_rtx_PLUS (SImode, gen_rtx_REG (SImode, 0),
XEXP (x, 0)));
else
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
break;
case REG:
case CONST:
case LABEL_REF:
case CODE_LABEL:
- v850_print_operand_address (file, x);
+ v850_print_operand_address (file, VOIDmode, x);
break;
default:
gcc_unreachable ();
/* Output assembly language output for the address ADDR to FILE. */
static void
-v850_print_operand_address (FILE * file, rtx addr)
+v850_print_operand_address (FILE * file, machine_mode /*mode*/, rtx addr)
{
switch (GET_CODE (addr))
{
}
- output_address (offset);
+ output_address (VOIDmode, offset);
}
if (breg != 0)
else if (REG_P (x))
fprintf (file, "%s", reg_names[REGNO (x)]);
else if (MEM_P (x))
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == SFmode)
{
char dstr[30];
&& (GET_MODE (x) == DFmode || GET_MODE (x) == DImode))
{
x = adjust_address (x, GET_MODE (x) == DFmode ? SFmode : SImode, 4);
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
}
else
output_operand_lossage ("invalid %%N value");
if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG)
fprintf (file, "%s", reg_names[xt_true_regnum (x)]);
else if (GET_CODE (x) == MEM)
- output_address (XEXP (x, 0));
+ output_address (GET_MODE (x), XEXP (x, 0));
else if (GET_CODE (x) == CONST_INT)
fprintf (file, "%ld", INTVAL (x));
else
else if (letter == 'l')
output_asm_label (operands[opnum]);
else if (letter == 'a')
- output_address (operands[opnum]);
+ output_address (VOIDmode, operands[opnum]);
else if (letter == 'c')
{
if (CONSTANT_ADDRESS_P (operands[opnum]))
machine-dependent assembler syntax. */
void
-output_address (rtx x)
+output_address (machine_mode mode, rtx x)
{
bool changed = false;
walk_alter_subreg (&x, &changed);
- targetm.asm_out.print_operand_address (asm_out_file, x);
+ targetm.asm_out.print_operand_address (asm_out_file, mode, x);
}
\f
/* Print an integer constant expression in assembler syntax.
/* Marks SYMBOL_REFs in x as referenced through use of assemble_external. */
extern void mark_symbol_refs_as_used (rtx);
-/* Print a memory reference operand for address X
+/* Print a memory reference operand for address X with access mode MODE
using machine-dependent assembler syntax. */
-extern void output_address (rtx);
+extern void output_address (machine_mode, rtx);
/* Print an integer constant expression in assembler syntax.
Addition and subtraction are the only arithmetic
DEFHOOK_UNDOC
(print_operand_address,
"",
- void, (FILE *file, rtx addr),
+ void, (FILE *file, machine_mode mode, rtx addr),
default_print_operand_address)
/* Determine whether CODE is a valid punctuation character for the
void
default_print_operand_address (FILE *stream ATTRIBUTE_UNUSED,
+ machine_mode /*mode*/,
rtx x ATTRIBUTE_UNUSED)
{
#ifdef PRINT_OPERAND_ADDRESS
(cumulative_args_t ca, machine_mode, const_tree, bool);
extern void default_print_operand (FILE *, rtx, int);
-extern void default_print_operand_address (FILE *, rtx);
+extern void default_print_operand_address (FILE *, machine_mode, rtx);
extern bool default_print_operand_punct_valid_p (unsigned char);
extern tree default_mangle_assembler_name (const char *);