+2016-12-01 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.c (avr_print_operand): Use SYMBOL_REF_P if possible.
+ (avr_handle_addr_attribute, avr_asm_output_aligned_decl_common)
+ (avr_asm_asm_output_aligned_bss, avr_addr_space_convert): Dito.
+
2016-12-01 Jakub Jelinek <jakub@redhat.com>
PR debug/78587
}
else if (code == 'i')
{
- if (GET_CODE (x) == SYMBOL_REF && (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO))
+ if (SYMBOL_REF_P (x) && (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO))
avr_print_operand_address
(file, VOIDmode, plus_constant (HImode, x, -avr_arch->sfr_offset));
else
rtx
avr_eval_addr_attrib (rtx x)
{
- if (GET_CODE (x) == SYMBOL_REF
+ if (SYMBOL_REF_P (x)
&& (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_ADDRESS))
{
tree decl = SYMBOL_REF_DECL (x);
rtx symbol;
if (mem != NULL_RTX && MEM_P (mem)
- && GET_CODE ((symbol = XEXP (mem, 0))) == SYMBOL_REF
+ && SYMBOL_REF_P ((symbol = XEXP (mem, 0)))
&& (SYMBOL_REF_FLAGS (symbol) & (SYMBOL_FLAG_IO | SYMBOL_FLAG_ADDRESS)))
{
rtx symbol;
if (mem != NULL_RTX && MEM_P (mem)
- && GET_CODE ((symbol = XEXP (mem, 0))) == SYMBOL_REF
+ && SYMBOL_REF_P ((symbol = XEXP (mem, 0)))
&& (SYMBOL_REF_FLAGS (symbol) & (SYMBOL_FLAG_IO | SYMBOL_FLAG_ADDRESS)))
{
if (!(SYMBOL_REF_FLAGS (symbol) & SYMBOL_FLAG_ADDRESS))
but are located in flash. In that case we patch the incoming
address space. */
- if (SYMBOL_REF == GET_CODE (sym)
+ if (SYMBOL_REF_P (sym)
&& ADDR_SPACE_FLASH == AVR_SYMBOL_GET_ADDR_SPACE (sym))
{
as_from = ADDR_SPACE_FLASH;