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

Re: [Xen-devel] [PATCH] x86: Fix build following c/s 623c720f "x86: use CLFLUSHOPT when available"



>>> On 11.02.16 at 20:25, <andrew.cooper3@xxxxxxxxxx> wrote:
> CentOS 7 gets into trouble when compiling Xen citing:
> 
>   flushtlb.c: Assembler messages:
>   flushtlb.c:149: Error: value of 256 too large for field of 1 bytes at 1
> 
> The line number is wrong, and the error message not helpful.  It turns out
> that the intermediate generated assembly was
> 
>   # 139 "arch/x86/flushtlb.c" 1
>       661:
>       rex clflush (%r15)
>   662:
>   .pushsection .altinstructions,"a"
> 
> and it was having trouble combining the explicit REX prefix with the REX.B
> required for the use of %r15.

What gas version is this? I just checked with 2.20, which has no
problem combining an explicit with a generated REX prefix. Or
wait, no, your description of the issue is wrong: It actually is the
folding of the two REX prefixes which causes the problem, since
that results in the replacement instruction being one byte longer
than the to be replaced one.

> Follow what Linux does and use a redundant %ds prefix instead, for a final
> generated instruction of `3e 41 0f ae 3f`
> 
> While modifying this line, fix the indentation which was out by one space.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

I think before committing I'll extend your patch by introducing
and using Linux'es NOP_DS_PREFIX.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.