This is the mail archive of the gcc-patches@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]

[ARM] Fix movdi2 for Thumb1


This was clearly a latent bug that's recently come to light as a result
of other changes (the bug appears to have been there pretty much since
Thumb support was added to the compiler).  It fixes a compile failure
with gcc.c-torture/compile/920413-1.c where we copy try to generate a
move insn that has different modes for source and destination.  Oops!

2009-05-16  Richard Earnshaw  <rearnsha@arm.com>

	* arm.md (movdi2): Copy non-reg values to DImode registers.


*** gcc/config/arm/arm.md	(revision 147648)
--- gcc/config/arm/arm.md	(local)
*************** (define_expand "adddi3"
*** 472,480 ****
    if (TARGET_THUMB1)
      {
        if (GET_CODE (operands[1]) != REG)
!         operands[1] = force_reg (SImode, operands[1]);
        if (GET_CODE (operands[2]) != REG)
!         operands[2] = force_reg (SImode, operands[2]);
       }
    "
  )
--- 472,480 ----
    if (TARGET_THUMB1)
      {
        if (GET_CODE (operands[1]) != REG)
!         operands[1] = force_reg (DImode, operands[1]);
        if (GET_CODE (operands[2]) != REG)
!         operands[2] = force_reg (DImode, operands[2]);
       }
    "
  )

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