powerpc: Hardcode popcnt instructions for old assemblers
The popcnt instructions went into binutils relatively recently. As with a number of other instructions, create macros and hardcode them. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
b8c49def6d
commit
b5f9b6665b
@@ -28,7 +28,7 @@ BEGIN_FTR_SECTION
|
||||
nop
|
||||
nop
|
||||
FTR_SECTION_ELSE
|
||||
popcntb r3,r3
|
||||
PPC_POPCNTB(r3,r3)
|
||||
clrldi r3,r3,64-8
|
||||
blr
|
||||
ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB)
|
||||
@@ -42,14 +42,14 @@ BEGIN_FTR_SECTION
|
||||
nop
|
||||
FTR_SECTION_ELSE
|
||||
BEGIN_FTR_SECTION_NESTED(50)
|
||||
popcntb r3,r3
|
||||
PPC_POPCNTB(r3,r3)
|
||||
srdi r4,r3,8
|
||||
add r3,r4,r3
|
||||
clrldi r3,r3,64-8
|
||||
blr
|
||||
FTR_SECTION_ELSE_NESTED(50)
|
||||
clrlwi r3,r3,16
|
||||
popcntw r3,r3
|
||||
PPC_POPCNTW(r3,r3)
|
||||
clrldi r3,r3,64-8
|
||||
blr
|
||||
ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 50)
|
||||
@@ -66,7 +66,7 @@ BEGIN_FTR_SECTION
|
||||
nop
|
||||
FTR_SECTION_ELSE
|
||||
BEGIN_FTR_SECTION_NESTED(51)
|
||||
popcntb r3,r3
|
||||
PPC_POPCNTB(r3,r3)
|
||||
srdi r4,r3,16
|
||||
add r3,r4,r3
|
||||
srdi r4,r3,8
|
||||
@@ -74,7 +74,7 @@ FTR_SECTION_ELSE
|
||||
clrldi r3,r3,64-8
|
||||
blr
|
||||
FTR_SECTION_ELSE_NESTED(51)
|
||||
popcntw r3,r3
|
||||
PPC_POPCNTW(r3,r3)
|
||||
clrldi r3,r3,64-8
|
||||
blr
|
||||
ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 51)
|
||||
@@ -93,7 +93,7 @@ BEGIN_FTR_SECTION
|
||||
nop
|
||||
FTR_SECTION_ELSE
|
||||
BEGIN_FTR_SECTION_NESTED(52)
|
||||
popcntb r3,r3
|
||||
PPC_POPCNTB(r3,r3)
|
||||
srdi r4,r3,32
|
||||
add r3,r4,r3
|
||||
srdi r4,r3,16
|
||||
@@ -103,7 +103,7 @@ FTR_SECTION_ELSE
|
||||
clrldi r3,r3,64-8
|
||||
blr
|
||||
FTR_SECTION_ELSE_NESTED(52)
|
||||
popcntd r3,r3
|
||||
PPC_POPCNTD(r3,r3)
|
||||
clrldi r3,r3,64-8
|
||||
blr
|
||||
ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 52)
|
||||
|
||||
Reference in New Issue
Block a user