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

Re: [Xen-devel] [PATCH for-4.7 0/5] build: fixes for building Xen with clang



On Sun, Apr 17, 2016 at 04:02:02AM -0600, Jan Beulich wrote:
> >>> Roger Pau Monne <roger.pau@xxxxxxxxxx> 04/15/16 8:29 PM >>>
> >I've also noticed that Xen always sets "-no-integrated-as" when using clang,
> >because previous versions (<3.8.0) didn't support .code16/.code32/.code64
> >in inline asm. This is solved at least in version 3.8.0 (haven't tested
> >older versions). The problem now to switch to the integrated clang assembler
> >is the usage of the rept instructions in some files in conjunction with
> >labels:
> >
> >entry.S:403:15: error: unexpected token in '.rept' directive
> >.rept 48 -((.-compat_hypercall_table)/8)
> >^
> >entry.S:405:14: error: unmatched '.endr' directive
> >.endr
> >[...]
> >The entry.S file this errors come from is xen/arch/x86/x86_64/compat/entry.S
> >
> >If anyone has any clever ideas about how to replace those instructions with
> >compatible ones, I'm more than willing to listen. AFAICT, this is the last
> >issue that prevents Xen from switch to the integrated clang assembler on
> >newer clang versions.
> 
> The question first of all is: What is it that is "unexpected" to their 
> built-in
> assembler? If they don't tolerate expressions involving the subtraction of
> two addresses (or even expressions at all), then I'm afraid there's not much
> we can do other than wait for them making their assembler more flexible.

The issue is that the clang assembler doesn't support using labels in asm 
directives, so it doesn't know how to resolve the 
(.-compat_hypercall_table). I've already filled a bug upstream:

https://llvm.org/bugs/show_bug.cgi?id=27369

I don't think we should expand that .rept directive manually, so I'm working 
with them in order to try to get their assembler to understand this.

Roger.

_______________________________________________
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®.