~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/include/asm/ppc-opcode.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#define PPC_INST_RFCI                   0x4c000066
42
42
#define PPC_INST_RFDI                   0x4c00004e
43
43
#define PPC_INST_RFMCI                  0x4c00004c
 
44
#define PPC_INST_MFSPR_DSCR             0x7c1102a6
 
45
#define PPC_INST_MFSPR_DSCR_MASK        0xfc1fffff
 
46
#define PPC_INST_MTSPR_DSCR             0x7c1103a6
 
47
#define PPC_INST_MTSPR_DSCR_MASK        0xfc1fffff
44
48
 
45
49
#define PPC_INST_STRING                 0x7c00042a
46
50
#define PPC_INST_STRING_MASK            0xfc0007fe
56
60
#define PPC_INST_TLBSRX_DOT             0x7c0006a5
57
61
#define PPC_INST_XXLOR                  0xf0000510
58
62
 
 
63
#define PPC_INST_NAP                    0x4c000364
 
64
#define PPC_INST_SLEEP                  0x4c0003a4
 
65
 
 
66
/* A2 specific instructions */
 
67
#define PPC_INST_ERATWE                 0x7c0001a6
 
68
#define PPC_INST_ERATRE                 0x7c000166
 
69
#define PPC_INST_ERATILX                0x7c000066
 
70
#define PPC_INST_ERATIVAX               0x7c000666
 
71
#define PPC_INST_ERATSX                 0x7c000126
 
72
#define PPC_INST_ERATSX_DOT             0x7c000127
 
73
 
59
74
/* macros to insert fields into opcodes */
60
75
#define __PPC_RA(a)     (((a) & 0x1f) << 16)
61
76
#define __PPC_RB(b)     (((b) & 0x1f) << 11)
67
82
#define __PPC_XT(s)     __PPC_XS(s)
68
83
#define __PPC_T_TLB(t)  (((t) & 0x3) << 21)
69
84
#define __PPC_WC(w)     (((w) & 0x3) << 21)
 
85
#define __PPC_WS(w)     (((w) & 0x1f) << 11)
 
86
 
70
87
/*
71
88
 * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
72
89
 * larx with EH set as an illegal instruction.
113
130
#define PPC_TLBIVAX(a,b)        stringify_in_c(.long PPC_INST_TLBIVAX | \
114
131
                                        __PPC_RA(a) | __PPC_RB(b))
115
132
 
 
133
#define PPC_ERATWE(s, a, w)     stringify_in_c(.long PPC_INST_ERATWE | \
 
134
                                        __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w))
 
135
#define PPC_ERATRE(s, a, w)     stringify_in_c(.long PPC_INST_ERATRE | \
 
136
                                        __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w))
 
137
#define PPC_ERATILX(t, a, b)    stringify_in_c(.long PPC_INST_ERATILX | \
 
138
                                        __PPC_T_TLB(t) | __PPC_RA(a) | \
 
139
                                        __PPC_RB(b))
 
140
#define PPC_ERATIVAX(s, a, b)   stringify_in_c(.long PPC_INST_ERATIVAX | \
 
141
                                        __PPC_RS(s) | __PPC_RA(a) | __PPC_RB(b))
 
142
#define PPC_ERATSX(t, a, w)     stringify_in_c(.long PPC_INST_ERATSX | \
 
143
                                        __PPC_RS(t) | __PPC_RA(a) | __PPC_RB(b))
 
144
#define PPC_ERATSX_DOT(t, a, w) stringify_in_c(.long PPC_INST_ERATSX_DOT | \
 
145
                                        __PPC_RS(t) | __PPC_RA(a) | __PPC_RB(b))
 
146
 
 
147
 
116
148
/*
117
149
 * Define what the VSX XX1 form instructions will look like, then add
118
150
 * the 128 bit load store instructions based on that.
126
158
#define XXLOR(t, a, b)          stringify_in_c(.long PPC_INST_XXLOR | \
127
159
                                               VSX_XX3((t), (a), (b)))
128
160
 
 
161
#define PPC_NAP                 stringify_in_c(.long PPC_INST_NAP)
 
162
#define PPC_SLEEP               stringify_in_c(.long PPC_INST_SLEEP)
 
163
 
129
164
#endif /* _ASM_POWERPC_PPC_OPCODE_H */