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


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, but in the rm->d case you end up allocating an unnecessary scratch register. So unless there's a reason to merge the patterns, I think they're best kept separate. Otherwise this looks pretty good.

Jeff


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