This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] AVR: implement HI/SI logic operations and sign/zero extension by define_insn_and_split ...
- From: Björn Haase <bjoern dot m dot haase at web dot de>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: Denis Chertykov <denisc at overta dot ru>,Andy Hutchinson <HutchinsonAndy at netscape dot net>,marekm at amelek dot gda dot pl,gcc-patches at gcc dot gnu dot org
- Date: Mon, 4 Apr 2005 18:22:50 +0200
- Subject: Re: [PATCH] AVR: implement HI/SI logic operations and sign/zero extension by define_insn_and_split ...
- References: <BE76722E.9B15%schlie@comcast.net>
> - might splitting SI/DI mode operations down to HI mode prior to reload
> both enable the word oriented instructions addw/subw/movw/mul(word
> result) to be leveraged while also providing more register allocation
> flexibility for function calls etc, and then conditionally spit further
> after reload insertion if determined to be beneficial (as I guess I don't
> understand how once an HI mode add is split, it can easily be re-joined to
> leverage an add word instruction for example if the required registers are
> available, but not otherwise?)
Maybe, but I have doubts, whether it will be possible to extract useable
condition codes from the expanded RTL:When expanding only towards HImode at
expand time, gcc still would have to be able to recognize that it could
simplify a sequence like
sub (low_word), sbc (high_word) cmp (low_word) cpc (high_word)
conditional_branch
to
sub (low_word), sbc (high_word) conditional_branch
. Gcc would have to overlook a span of 5 Instructions! I don't think that this
would work. IIRC, I have read something, that combine could join up to three
instructions. You might have a look at the combine sources.?
Yours,
Björn