Re: [RFC, PATCHv1 15/28] x86: detect 5-level paging support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On December 13, 2016 11:44:06 PM GMT+01:00, "H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
>When compiling with -fPIC gcc treats ebx as a "fixed register".  A
>fixed
>register can't be spilled, and so a clobber of a fixed register is a
>fatal error.
>
>Like it or not, it's how it works.
>
>	-hpa

In the meantime I talked to my gcc guy and here's the deal:

There are gcc versions (4.x and earlier) which do not save/restore the PIC register around an inline asm even if it is one of the registers that the inline asm clobbers. Therefore the saving/restoring needs to be done by the inline asm itself.

5.x and later handle that fine.

Thus I was thinking of adding a build-time check for the gcc version but that might turn out to be more code in the end than those ugly ifnc clauses. 
-- 
Sent from a small device: formatting sux and brevity is inevitable. 
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux