|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 02/34] xen: clang: Disable built-in assembler
>>> On 27.03.14 at 19:01, <tim@xxxxxxx> wrote:
> The patch below works for me (at least as far as building
> asm-offsets.h on x86) by wrapping everything in a string. I did try
> just prefixing with '#' but clang 3.5 also strips the comments out.
> That seems unhelpful, since I know some people put comments in their
> inline assembler too. :(
Looks generally okay, but in order for it to be as simple (and hence
understandable) as possible ...
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -150,7 +150,7 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h:
> arch/$(TARGET_ARCH)/asm-offsets.s
> echo "#ifndef __ASM_OFFSETS_H__"; \
> echo "#define __ASM_OFFSETS_H__"; \
> echo ""; \
> - sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2
> /* \3 */:; s:->::; p;}"; \
> + sed -ne "/==>/{s:^.*==>\(.*\)<==.*:\1:; s:^\([^ ]*\) [\$$#]*\([^ ]*\)
> \(.*\):#define \1 \2 /* \3 */:; p;}"; \
... I think you should drop the ^ anchoring here, at least for the first
expression (.* will match from the beginning of the string anyway). I
also wonder whether, now that we're intending to make use of it
elsewhere anyway, you shouldn't pass -r too, allowing all the escapes
on the parentheses to be dropped.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |