On Wed, Jul 25, 2012 at 09:03:58AM +0100, David Chisnall wrote:
> On 24 Jul 2012, at 23:43, Konstantin Belousov wrote:
> 
> > As kan rightfully notes, the assumption that &%fs:0 == *%fs:0 holds for
> > userspace on amd64, and the same is true for %gs userspace on i386.
> > The change you committed to clang/llvm/whatever it called just breaks
> > useful optimization for FreeBSD.
> 
> If you can suggest a way of differentiating the kernel and userspace 
> compilation targets, then I would be happy to hear it and will make the 
> appropriate change.    Until then, I would rather have slightly sub-optimal 
> code in userspace than incorrect code in kernelspace.

Try to differentiate on the memory layout model, the -mcmodel=kernel thing.
It shall be passed down to the very last stage of the backend, I believe.

> 
> > Sigh
> 
> Very helpful, thank you.
> 
> David

Attachment: pgpYVyO8uzUMe.pgp
Description: PGP signature

Reply via email to