Anton Blanchard b4c112114a powerpc: Fix bad inline asm constraint in create_zero_mask()
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.

Cc: stable@vger.kernel.org
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>
2016-05-02 11:10:25 +10:00
..
2016-03-11 17:18:02 -06:00
2016-01-12 20:46:53 +02:00
2011-03-31 11:26:23 -03:00
2015-07-13 10:10:54 +10:00
2013-04-18 13:03:53 +10:00
2015-05-28 15:31:53 +02:00
2014-04-09 12:53:28 +10:00
2012-03-28 18:30:02 +01:00
2014-01-23 16:36:54 -08:00
2011-11-08 14:51:46 +11:00
2014-06-25 18:49:40 -05:00
2015-01-12 05:04:13 -08:00
2015-02-03 18:47:18 +01:00
2016-03-04 23:50:27 -06:00
2014-11-03 12:12:32 +11:00
2016-03-01 19:27:20 +11:00
2016-03-01 19:27:20 +11:00
2015-07-13 10:10:54 +10:00
2015-02-23 14:52:04 +11:00
2015-10-06 14:52:48 -04:00
2016-01-15 17:56:32 -08:00
2011-07-26 16:49:47 -07:00
2013-12-09 11:40:25 +11:00
2011-03-31 11:26:23 -03:00
2016-03-19 15:38:41 -07:00
2016-03-29 12:08:08 +11:00
2015-12-14 15:19:14 +11:00
2015-12-17 22:40:56 +11:00
2013-11-06 14:13:49 +11:00
2016-03-19 15:38:41 -07:00
2016-03-01 19:27:20 +11:00
2012-09-17 16:31:51 +10:00
2011-03-31 11:26:23 -03:00
2014-02-17 11:19:37 +11:00
2015-05-05 13:35:39 -06:00
2016-03-19 15:38:41 -07:00
2013-10-30 16:02:28 +11:00