[llvm] r195632 - X86: enable AVX2 under Haswell native compilation

Tim Northover t.p.northover at gmail.com
Mon Nov 25 05:39:05 PST 2013


> one question about this code (and the i386 counterpart): why can't you just
> specify rbx/ebx as an output register? this is how linux has always done it
> and it works fine with gcc.

After doing some archaeology, it seems that %ebx needs to contain the
address of the GOT in 32-bit x86 PIC mode, which probably explains why
there's never any question of a problem on Linux.

In fact, it appears GCC disallows using the "b" constraint entirely in
x86 PIC. I can't work out *what* Clang's doing, but it looks like it
might upset me if I did.

Of course, none of that applies to x86-64, which has proper
PC-relative addressing. My guess is inertia there.

Cheers.

Tim.



More information about the llvm-commits mailing list