gcc 3.4.0 m68k-elf generates illegal code for ColdFire (maybe a fix)
Peter Jakubek
peter@lasergraph-dsp.de
Tue Jun 1 17:12:00 GMT 2004
Bernardo Innocenti wrote:
>
> By removing the "GET_CODE (operand) == MEM" check
> you're maybe underspecifying the condition. The operand
> may also be an immediate or a hard register.
>
> Maybe this?
>
> || BYTES_BIG_ENDIAN
> && (GET_CODE (operand) == MEM)
> || (GET_CODE(operand) == REG
> && REGNO(operand) >= FIRST_PSEUDO_REGISTER))
>
>
I don't think this is needed. If you review the full if () statement
you will see there is a test for MEM/PSEUDO REG above already.
Here is a reformatted version that makes the nesting/operator precedence
more clear:
|| ( ( GET_CODE (operand) == MEM
|| ( GET_CODE (operand) == REG
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER))
#ifndef WORD_REGISTER_OPERATIONS
&& ( ( ( GET_MODE_BITSIZE (GET_MODE (operand))
< BIGGEST_ALIGNMENT)
&& ( GET_MODE_SIZE (operand_mode[i])
> GET_MODE_SIZE (GET_MODE (operand))))
|| (/*GET_CODE (operand) == MEM &&*/ BYTES_BIG_ENDIAN)
#ifdef LOAD_EXTEND_OP
|| ( GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD
&& ( GET_MODE_SIZE (GET_MODE (operand))
<= UNITS_PER_WORD)
&& ( GET_MODE_SIZE (operand_mode[i])
> GET_MODE_SIZE (GET_MODE (operand)))
&& INTEGRAL_MODE_P (GET_MODE (operand))
&& LOAD_EXTEND_OP (GET_MODE (operand)) != NIL)
#endif
)
#endif
)
Hope my interpretation is correct,
Peter Jakubek
LaserAnimation Sollinger GmbH
peter@lasergraph-dsp.de
More information about the Gcc
mailing list