gcc 3.4.0 m68k-elf generates illegal code for ColdFire (maybe a fix)

Bernardo Innocenti bernie@develer.com
Thu Jun 3 01:08:00 GMT 2004


Peter Jakubek wrote:
> Bernardo Innocenti wrote:
> 
>>
>> I see.  I should have gone in reload.c and see the
>> full thing.  Now I see you were right.
>>
>> Unfortunately, I can't regtest any patches right
>> now because both 3_4-branch and mainline are
>> currently broken on the m68k.
>>
>> Richard, do you approve this patch for mainline?
>>
>> (I've slightly edited the ChangeLog entry
>> and removed the extra parentheses).
>>
>> 2004-05-27  Peter Jakubek  <peter@laseranimation.com>
>>
>>    * reload.c (find_reloads): Force reload for pseudo registers on big
>>    endian machines.
>>
>> diff -ru gcc.orig/gcc/reload.c gcc/gcc/reload.c
>> --- gcc.orig/gcc/reload.c    2004-03-10 02:51:01.000000000 +0100
>> +++ gcc/gcc/reload.c    2004-05-27 13:07:32.828125000 +0200
>> @@ -2947,7 +2947,7 @@
>>                 < BIGGEST_ALIGNMENT)
>>                && (GET_MODE_SIZE (operand_mode[i])
>>                    > GET_MODE_SIZE (GET_MODE (operand))))
>> -              || (GET_CODE (operand) == MEM && BYTES_BIG_ENDIAN)
>> +              || BYTES_BIG_ENDIAN
>> #ifdef LOAD_EXTEND_OP
>>               || (GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD
>>                   && (GET_MODE_SIZE (GET_MODE (operand))
>>
> 
> Thanks!
> 
> Now we have to wait until someone else takes a closer look.
> 
> I have tested the patch with success on ColdFire and 68k targets,
> but can't say anything about other big endian targets.

The automated tests should catch any regressions because
they're also ran on a rs6000-apple-darwin host.

If something bad happens, we can revert the patch in a
few minutes.

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/



More information about the Gcc mailing list