Thread (103 messages) 103 messages, 16 authors, 2017-12-04

[PATCH v2 16/18] arm64: crypto: disable LTO for aes-ce-cipher.c

From: Alex Matveev <hidden>
Date: 2017-11-20 21:29:47
Also in: linux-kbuild, lkml

On Mon, 20 Nov 2017 15:20:14 +0000
Mark Rutland [off-list ref] wrote:
On Wed, Nov 15, 2017 at 01:34:26PM -0800, Sami Tolvanen wrote:
quoted
CONFIG_LTO_CLANG requires the use of clang's integrated assembler,
which doesn't understand the inline assembly in aes-ce-cipher.c.
Disable LTO for the file to work around the issue.  
Could you elaborate on what the integrated asembler doesn't like?

It's not entirely clear at a glance, as the asm in that file doesn't
seem to do anything that obscure.

Is it a bug?
Turns out, integrated assembler doesn't like this instruction in
aes_sub():
	umov	%w[out], v0.4s[0]

Specifically, it barks at "v0.4s[0]" part. And the way I read the spec,
it's quite correct in not accepting this argument. From UMOV
description:

UMOV <Wd>, <Vn>.<Ts>[<index>]

...

<Ts> For the 32-bit variant: is an element size specifier, encoded in
the "imm5" field. It can have the following values:
	B	when imm5 = xxxx1
	H	when imm5 = xxx10
	S	when imm5 = xx100


With "v0.s[0]" it builds fine.

Ard, since this is your code, can you comment? Feels like a typo.

Regards,
Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help