lkml.org 
[lkml]   [2017]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] lib/mpi: fix build with clang
On Thu, Apr 20, 2017 at 5:40 AM, Stefan Agner <stefan@agner.ch> wrote:
> Use just @ to denote comments which works with gcc and clang.
> Otherwise clang reports an escape sequence error:
> error: invalid % escape in inline assembly string
>
> Use %0-%3 as operand references, this avoids:
> error: invalid operand in inline asm: 'umull ${1:r}, ${0:r}, ${2:r}, ${3:r}'
>
> Also remove superfluous casts on output operands to avoid warnings
> such as:
> warning: invalid use of a cast in an inline asm context requiring an l-value
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> I checked the output of gcc with -S switch before and after this change,
> gcc generated the same assembly.

I've done a lot of build testing on a tree that contains a very similar patch.

Acked-by: Arnd Bergmann <arnd@arndb.de>

\
 
 \ /
  Last update: 2017-04-20 10:24    [W:0.078 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site