diff options
author | Anton Blanchard <anton@samba.org> | 2010-12-07 14:58:17 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-12-08 23:35:30 -0500 |
commit | b5f9b6665b70b4c844bed5452f6a14743eefa57c (patch) | |
tree | 51c632149aa23af7eaa68283416dba9d8b8ee3b8 /arch/powerpc/include | |
parent | b8c49def6d73321724bab66dd30526744b482f0a (diff) |
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>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 43adc8b819ed..1255569387b6 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -36,6 +36,8 @@ | |||
36 | #define PPC_INST_NOP 0x60000000 | 36 | #define PPC_INST_NOP 0x60000000 |
37 | #define PPC_INST_POPCNTB 0x7c0000f4 | 37 | #define PPC_INST_POPCNTB 0x7c0000f4 |
38 | #define PPC_INST_POPCNTB_MASK 0xfc0007fe | 38 | #define PPC_INST_POPCNTB_MASK 0xfc0007fe |
39 | #define PPC_INST_POPCNTD 0x7c0003f4 | ||
40 | #define PPC_INST_POPCNTW 0x7c0002f4 | ||
39 | #define PPC_INST_RFCI 0x4c000066 | 41 | #define PPC_INST_RFCI 0x4c000066 |
40 | #define PPC_INST_RFDI 0x4c00004e | 42 | #define PPC_INST_RFDI 0x4c00004e |
41 | #define PPC_INST_RFMCI 0x4c00004c | 43 | #define PPC_INST_RFMCI 0x4c00004c |
@@ -88,6 +90,12 @@ | |||
88 | __PPC_RB(b) | __PPC_EH(eh)) | 90 | __PPC_RB(b) | __PPC_EH(eh)) |
89 | #define PPC_MSGSND(b) stringify_in_c(.long PPC_INST_MSGSND | \ | 91 | #define PPC_MSGSND(b) stringify_in_c(.long PPC_INST_MSGSND | \ |
90 | __PPC_RB(b)) | 92 | __PPC_RB(b)) |
93 | #define PPC_POPCNTB(a, s) stringify_in_c(.long PPC_INST_POPCNTB | \ | ||
94 | __PPC_RA(a) | __PPC_RS(s)) | ||
95 | #define PPC_POPCNTD(a, s) stringify_in_c(.long PPC_INST_POPCNTD | \ | ||
96 | __PPC_RA(a) | __PPC_RS(s)) | ||
97 | #define PPC_POPCNTW(a, s) stringify_in_c(.long PPC_INST_POPCNTW | \ | ||
98 | __PPC_RA(a) | __PPC_RS(s)) | ||
91 | #define PPC_RFCI stringify_in_c(.long PPC_INST_RFCI) | 99 | #define PPC_RFCI stringify_in_c(.long PPC_INST_RFCI) |
92 | #define PPC_RFDI stringify_in_c(.long PPC_INST_RFDI) | 100 | #define PPC_RFDI stringify_in_c(.long PPC_INST_RFDI) |
93 | #define PPC_RFMCI stringify_in_c(.long PPC_INST_RFMCI) | 101 | #define PPC_RFMCI stringify_in_c(.long PPC_INST_RFMCI) |