[PATCH 3/5] checksum: use pre increment.

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Apr 27 00:53:10 CEST 2010


Ondrej Filip <feela at network.cz> wrote on 2010/04/26 17:40:57:
>
> On 25.4.2010 23:40, Joakim Tjernlund wrote:
> >
> > Martin Mares <mj at ucw.cz> wrote on 2010/04/25 23:33:49:
> >>
> >>> Some archs(RISC like archs) can do pre increment and load
> >>> in one insn but gcc optimization often fails to take advantage
> >>> of that. Help gcc to do the right thing by using pre increment
> >>> instead of post increment.
> >>
> >> This one is a little bit dubious, I would rather not twist the code
> >> so much in order to help a specific version of GCC. I guess that this
> >> will vary wildly between GCC versions.
> >
> > Sadly not, I have used 2.95, 3.4.6 and 4.3.4 and PowerPC still
> > doesn't get it right. I agree that gcc SHOULD fix this but in real
> > life it doesn't so I always help gcc when it comes to loops such
> > as these.
>
> I support MJ's view. I don't think it's a good idea to add asm lines
> to BIRD's code.

OK but just as you know, "add with carry" isn't supported in any gcc, not even
in gcc git repo. It will be a LONG time until such support is in place
and in a compiler near a you. I would not be surprised if x86 is the
only arch gcc supports "add with carry".




More information about the Bird-users mailing list