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]

Re: [PATCH][M68K] Fix extendsidi pattern to handle ColdFire


Jeff Law wrote:
Maxim Kuvyrkov wrote:
Hello,

The attached patch fixes problem in extendsidi2_mem pattern that allows it to output instruction that does not take into account ColdFire addressing restrictions. Specifically, the last alternative allows offset addressing for both operands while ColdFire can handle at most one offset in an instruction.

To fix the problem patch cleans up extendsidi2 and extendsidi2_mem patterns merging them into one and adds a ColdFire-specific alternative to the result.

Tested on ColdFire bare-metal. OK for trunk?


2008-11-19 Maxim Kuvyrkov <maxim@codesourcery.com>


    * config/m68k/m68k.md (ok_for_coldfire, enabled): New attributes.
    (extendsidi2, extendsidi2_mem): Merge, clean up.  Disable unsupported
    alternative for ColdFire, add new alternative that ColdFire can handle.

2008-11-19 Maxim Kuvyrkov <maxim@codesourcery.com>

* gcc.c-torture/compile/20080929-1.c: New.

I'm not sure what you get by merging the two patterns -- it's not a huge deal,

Just a cleanup.


but in the rm->d case you end up allocating an unnecessary scratch register.

But why? In rm->d case the constraints in the (match_scratch)'es are 'X', so the RA/reload should not assign anything meaningful to them. Or am I misinterpreting GCC Internals?


--
MaximK


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