svn commit: r216977 - in head/libexec/rtld-elf: amd64 i386
jhb at freebsd.org
Wed Jan 5 15:02:53 UTC 2011
On Wednesday, January 05, 2011 9:50:40 am Nathan Whitehorn wrote:
> On 01/05/11 08:28, John Baldwin wrote:
> > On Wednesday, January 05, 2011 8:36:06 am Dimitry Andric wrote:
> >> On 2011-01-05 13:59, John Baldwin wrote:
> >>>> Why not to add NO_HWFLOAT knob (or similar) into makefile
> >>>> infrastructure. And set CFLAGS accordingly, depending on CC, arch, etc.
> >>>> These flags are getting rather common in tree.
> >>> It strikes me that we really want clang/gcc to have some sort of
> >>> '-mno-hwfloat' so we don't keep having to add new flags in the future.
> >> This is not just about floats, clang can also use SSE/AVX instructions
> >> for e.g. memset(), memcpy() and the like, or even for structure
> >> assignments.
> > Yes, but the thing that all these extensions have in common is that they use
> > FPU state (i.e. subject to DNA traps, managed via *SAVE and *RSTOR, etc.)
> > and that is the problem with using them in boot code or rtld. What I would
> > want a -mno-hwfloat flag to do is to disable use of anything that would
> > require working FPU state handling.
> You would also want this to be cross-platform, in which case it's more
> than floating point. E.g. on powerpc, you also want to disable both FP
> and vector extensions, which use separate sets of instructions and
> registers. I guess overriding CPU type to be something very old (386?)
> potentially deoptimizes the code?
Hmm, I don't know if this is generically MI, but at least for x86 having a
single -mno-sse-xmm-mmx-anything-registers-please would be useful I think.
More information about the svn-src-head