how long to keep support for gcc on x86?

John-Mark Gurney jmg at funkthat.com
Sun Jan 13 22:48:01 UTC 2013


Peter Wemm wrote this message on Sun, Jan 13, 2013 at 14:26 -0800:
> On Sun, Jan 13, 2013 at 12:29 PM, John-Mark Gurney <jmg at funkthat.com> wrote:
> > Adrian Chadd wrote this message on Sat, Jan 12, 2013 at 23:44 -0800:
> >>
> >> People are still ironing out kinks/differences with clang. Anyone
> >> saying otherwise is likely pushing an agenda. :-)
> >>
> >> Thus I think adding clang-only code to the system right now is very,
> >> very premature. There still seem to be reasons to run systems on GCC
> >> instead of clang.
> >>
> >> If you have a need for new instruction support, perhaps look at adding
> >> it to our base GCC for the time being?
> >
> > I did look at it briefly, but I don't know gcc's internals, and it would
> > take me 5+ hours to do it, while someone who does know gcc would take
> > abount a half an hour (just a guess)...  I don't have the free time I
> > used to, otherwise I would of done it by now..
> 
> It seems to me that since clang is the default compiler for the
> platforms that have AES-NI that the following could be done:
> 
> * get the inline AES-NI stuff in and debugged and solid.
> * .. without breaking the existing gcc-compatible code
> * once the support is solid, decide what the appropriate thing to do for gcc is.
> 
> .. so long as the existing code doesn't get broken.
> 
> Trying to do backwards compatibility port to gcc with a moving target
> has potential to be a work multiplier.

I already have a gcc compatible version of an improved AES-NI for
amd64...  The real question is, do I improve things further by using
intrinsics which means we can share code between amd64 and i386 and get
great performance from both, or do I simply make a seperate version
for i386 that is gcc compatible, but not as good performance...

Though a lot of this last little bit of performance questions isn't too
useful since the overhead of the crypto framework and geom introduces
a significant overhead already...

I'm not too interesting in creating AES-NI v2 module and having two
versions that do the same thing just because of a compiler issue...

So I'm going to go with the plan of making an i386 and gcc compatible
version... it'll still be a 4x+ performance over the existing code...
This also means we could back port it to 9-stable if we wanted to...

Thanks for the input...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-arch mailing list