diff options
| author | Anton Blanchard <anton@samba.org> | 2016-04-30 08:29:27 +1000 |
|---|---|---|
| committer | Ben Hutchings <ben@decadent.org.uk> | 2016-06-15 21:29:29 +0100 |
| commit | 17cabcb4ab60c2bb30fce5ae8f94fd9d3755bbf8 (patch) | |
| tree | 2779265dc835ed8626676eb842c81ab8d5186417 /include | |
| parent | dfc39542206c060e008f36060f13ea29a8e2783b (diff) | |
powerpc: Fix bad inline asm constraint in create_zero_mask()
commit b4c112114aab9aff5ed4568ca5e662bb02cdfe74 upstream.
In create_zero_mask() we have:
addi %1,%2,-1
andc %1,%1,%2
popcntd %0,%1
using the "r" constraint for %2. r0 is a valid register in the "r" set,
but addi X,r0,X turns it into an li:
li r7,-1
andc r7,r7,r0
popcntd r4,r7
Fix this by using the "b" constraint, for which r0 is not a valid
register.
This was found with a kernel build using gcc trunk, narrowed down to
when -frename-registers was enabled at -O2. It is just luck however
that we aren't seeing this on older toolchains.
Thanks to Segher for working with me to find this issue.
Fixes: d0cebfa650a0 ("powerpc: word-at-a-time optimization for 64-bit Little Endian")
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
[bwh: Backported to 3.16: same issue exists with a different variable in
find_zero()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
