This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 3.4.0 m68k-elf generates illegal code for ColdFire (maybea fix)


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]