aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/ppc-opcode.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index 384a96db794a..3e25b258568e 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -59,6 +59,14 @@
59#define PPC_INST_NAP 0x4c000364 59#define PPC_INST_NAP 0x4c000364
60#define PPC_INST_SLEEP 0x4c0003a4 60#define PPC_INST_SLEEP 0x4c0003a4
61 61
62/* A2 specific instructions */
63#define PPC_INST_ERATWE 0x7c0001a6
64#define PPC_INST_ERATRE 0x7c000166
65#define PPC_INST_ERATILX 0x7c000066
66#define PPC_INST_ERATIVAX 0x7c000666
67#define PPC_INST_ERATSX 0x7c000126
68#define PPC_INST_ERATSX_DOT 0x7c000127
69
62/* macros to insert fields into opcodes */ 70/* macros to insert fields into opcodes */
63#define __PPC_RA(a) (((a) & 0x1f) << 16) 71#define __PPC_RA(a) (((a) & 0x1f) << 16)
64#define __PPC_RB(b) (((b) & 0x1f) << 11) 72#define __PPC_RB(b) (((b) & 0x1f) << 11)
@@ -70,6 +78,8 @@
70#define __PPC_XT(s) __PPC_XS(s) 78#define __PPC_XT(s) __PPC_XS(s)
71#define __PPC_T_TLB(t) (((t) & 0x3) << 21) 79#define __PPC_T_TLB(t) (((t) & 0x3) << 21)
72#define __PPC_WC(w) (((w) & 0x3) << 21) 80#define __PPC_WC(w) (((w) & 0x3) << 21)
81#define __PPC_WS(w) (((w) & 0x1f) << 11)
82
73/* 83/*
74 * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a 84 * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
75 * larx with EH set as an illegal instruction. 85 * larx with EH set as an illegal instruction.
@@ -116,6 +126,21 @@
116#define PPC_TLBIVAX(a,b) stringify_in_c(.long PPC_INST_TLBIVAX | \ 126#define PPC_TLBIVAX(a,b) stringify_in_c(.long PPC_INST_TLBIVAX | \
117 __PPC_RA(a) | __PPC_RB(b)) 127 __PPC_RA(a) | __PPC_RB(b))
118 128
129#define PPC_ERATWE(s, a, w) stringify_in_c(.long PPC_INST_ERATWE | \
130 __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w))
131#define PPC_ERATRE(s, a, w) stringify_in_c(.long PPC_INST_ERATRE | \
132 __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w))
133#define PPC_ERATILX(t, a, b) stringify_in_c(.long PPC_INST_ERATILX | \
134 __PPC_T_TLB(t) | __PPC_RA(a) | \
135 __PPC_RB(b))
136#define PPC_ERATIVAX(s, a, b) stringify_in_c(.long PPC_INST_ERATIVAX | \
137 __PPC_RS(s) | __PPC_RA(a) | __PPC_RB(b))
138#define PPC_ERATSX(t, a, w) stringify_in_c(.long PPC_INST_ERATSX | \
139 __PPC_RS(t) | __PPC_RA(a) | __PPC_RB(b))
140#define PPC_ERATSX_DOT(t, a, w) stringify_in_c(.long PPC_INST_ERATSX_DOT | \
141 __PPC_RS(t) | __PPC_RA(a) | __PPC_RB(b))
142
143
119/* 144/*
120 * Define what the VSX XX1 form instructions will look like, then add 145 * Define what the VSX XX1 form instructions will look like, then add
121 * the 128 bit load store instructions based on that. 146 * the 128 bit load store instructions based on that.