aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/ppc-opcode.h
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2012-06-25 09:33:25 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-10 05:18:35 -0400
commit962cffbd8a21ad380ec71a6f5ea55a8e08f32dd1 (patch)
tree378842a721bfd35cc54bd94e1a26d499c6fb43ac /arch/powerpc/include/asm/ppc-opcode.h
parentf4c015795c74ec31b7ad0b8e11d07946fe853db4 (diff)
powerpc: Enforce usage of RA 0-R31 where possible
Some macros use RA where when RA=R0 the values is 0, so make this the enforced mnemonic in the macro. Idea suggested by Andreas Schwab. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/ppc-opcode.h')
-rw-r--r--arch/powerpc/include/asm/ppc-opcode.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index 03ec90fca009..4c25319f2fbc 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -231,7 +231,7 @@
231#define PPC_RFDI stringify_in_c(.long PPC_INST_RFDI) 231#define PPC_RFDI stringify_in_c(.long PPC_INST_RFDI)
232#define PPC_RFMCI stringify_in_c(.long PPC_INST_RFMCI) 232#define PPC_RFMCI stringify_in_c(.long PPC_INST_RFMCI)
233#define PPC_TLBILX(t, a, b) stringify_in_c(.long PPC_INST_TLBILX | \ 233#define PPC_TLBILX(t, a, b) stringify_in_c(.long PPC_INST_TLBILX | \
234 __PPC_T_TLB(t) | __PPC_RA(a) | __PPC_RB(b)) 234 __PPC_T_TLB(t) | __PPC_RA0(a) | __PPC_RB(b))
235#define PPC_TLBILX_ALL(a, b) PPC_TLBILX(0, a, b) 235#define PPC_TLBILX_ALL(a, b) PPC_TLBILX(0, a, b)
236#define PPC_TLBILX_PID(a, b) PPC_TLBILX(1, a, b) 236#define PPC_TLBILX_PID(a, b) PPC_TLBILX(1, a, b)
237#define PPC_TLBILX_VA(a, b) PPC_TLBILX(3, a, b) 237#define PPC_TLBILX_VA(a, b) PPC_TLBILX(3, a, b)
@@ -240,23 +240,23 @@
240#define PPC_TLBIE(lp,a) stringify_in_c(.long PPC_INST_TLBIE | \ 240#define PPC_TLBIE(lp,a) stringify_in_c(.long PPC_INST_TLBIE | \
241 ___PPC_RB(a) | ___PPC_RS(lp)) 241 ___PPC_RB(a) | ___PPC_RS(lp))
242#define PPC_TLBSRX_DOT(a,b) stringify_in_c(.long PPC_INST_TLBSRX_DOT | \ 242#define PPC_TLBSRX_DOT(a,b) stringify_in_c(.long PPC_INST_TLBSRX_DOT | \
243 __PPC_RA(a) | __PPC_RB(b)) 243 __PPC_RA0(a) | __PPC_RB(b))
244#define PPC_TLBIVAX(a,b) stringify_in_c(.long PPC_INST_TLBIVAX | \ 244#define PPC_TLBIVAX(a,b) stringify_in_c(.long PPC_INST_TLBIVAX | \
245 __PPC_RA(a) | __PPC_RB(b)) 245 __PPC_RA0(a) | __PPC_RB(b))
246 246
247#define PPC_ERATWE(s, a, w) stringify_in_c(.long PPC_INST_ERATWE | \ 247#define PPC_ERATWE(s, a, w) stringify_in_c(.long PPC_INST_ERATWE | \
248 __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w)) 248 __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w))
249#define PPC_ERATRE(s, a, w) stringify_in_c(.long PPC_INST_ERATRE | \ 249#define PPC_ERATRE(s, a, w) stringify_in_c(.long PPC_INST_ERATRE | \
250 __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w)) 250 __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w))
251#define PPC_ERATILX(t, a, b) stringify_in_c(.long PPC_INST_ERATILX | \ 251#define PPC_ERATILX(t, a, b) stringify_in_c(.long PPC_INST_ERATILX | \
252 __PPC_T_TLB(t) | __PPC_RA(a) | \ 252 __PPC_T_TLB(t) | __PPC_RA0(a) | \
253 __PPC_RB(b)) 253 __PPC_RB(b))
254#define PPC_ERATIVAX(s, a, b) stringify_in_c(.long PPC_INST_ERATIVAX | \ 254#define PPC_ERATIVAX(s, a, b) stringify_in_c(.long PPC_INST_ERATIVAX | \
255 __PPC_RS(s) | __PPC_RA(a) | __PPC_RB(b)) 255 __PPC_RS(s) | __PPC_RA0(a) | __PPC_RB(b))
256#define PPC_ERATSX(t, a, w) stringify_in_c(.long PPC_INST_ERATSX | \ 256#define PPC_ERATSX(t, a, w) stringify_in_c(.long PPC_INST_ERATSX | \
257 __PPC_RS(t) | __PPC_RA(a) | __PPC_RB(b)) 257 __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b))
258#define PPC_ERATSX_DOT(t, a, w) stringify_in_c(.long PPC_INST_ERATSX_DOT | \ 258#define PPC_ERATSX_DOT(t, a, w) stringify_in_c(.long PPC_INST_ERATSX_DOT | \
259 __PPC_RS(t) | __PPC_RA(a) | __PPC_RB(b)) 259 __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b))
260#define PPC_SLBFEE_DOT(t, b) stringify_in_c(.long PPC_INST_SLBFEE | \ 260#define PPC_SLBFEE_DOT(t, b) stringify_in_c(.long PPC_INST_SLBFEE | \
261 __PPC_RT(t) | __PPC_RB(b)) 261 __PPC_RT(t) | __PPC_RB(b))
262/* PASemi instructions */ 262/* PASemi instructions */