@@ -75,23 +75,23 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
7575#define PPC_NOP () EMIT(PPC_INST_NOP)
7676#define PPC_BLR () EMIT(PPC_INST_BLR)
7777#define PPC_BLRL () EMIT(PPC_INST_BLRL)
78- #define PPC_MTLR (r ) EMIT(PPC_INST_MTLR | __PPC_RT (r))
79- #define PPC_ADDI (d , a , i ) EMIT(PPC_INST_ADDI | __PPC_RT (d) | \
80- __PPC_RA (a) | IMM_L(i))
78+ #define PPC_MTLR (r ) EMIT(PPC_INST_MTLR | ___PPC_RT (r))
79+ #define PPC_ADDI (d , a , i ) EMIT(PPC_INST_ADDI | ___PPC_RT (d) | \
80+ ___PPC_RA (a) | IMM_L(i))
8181#define PPC_MR (d , a ) PPC_OR(d, a, a)
8282#define PPC_LI (r , i ) PPC_ADDI(r, 0, i)
8383#define PPC_ADDIS (d , a , i ) EMIT(PPC_INST_ADDIS | \
84- __PPC_RS (d) | __PPC_RA (a) | IMM_L(i))
84+ ___PPC_RS (d) | ___PPC_RA (a) | IMM_L(i))
8585#define PPC_LIS (r , i ) PPC_ADDIS(r, 0, i)
86- #define PPC_STD (r , base , i ) EMIT(PPC_INST_STD | __PPC_RS (r) | \
87- __PPC_RA (base) | ((i) & 0xfffc))
88-
89- #define PPC_LD (r , base , i ) EMIT(PPC_INST_LD | __PPC_RT (r) | \
90- __PPC_RA (base) | IMM_L(i))
91- #define PPC_LWZ (r , base , i ) EMIT(PPC_INST_LWZ | __PPC_RT (r) | \
92- __PPC_RA (base) | IMM_L(i))
93- #define PPC_LHZ (r , base , i ) EMIT(PPC_INST_LHZ | __PPC_RT (r) | \
94- __PPC_RA (base) | IMM_L(i))
86+ #define PPC_STD (r , base , i ) EMIT(PPC_INST_STD | ___PPC_RS (r) | \
87+ ___PPC_RA (base) | ((i) & 0xfffc))
88+
89+ #define PPC_LD (r , base , i ) EMIT(PPC_INST_LD | ___PPC_RT (r) | \
90+ ___PPC_RA (base) | IMM_L(i))
91+ #define PPC_LWZ (r , base , i ) EMIT(PPC_INST_LWZ | ___PPC_RT (r) | \
92+ ___PPC_RA (base) | IMM_L(i))
93+ #define PPC_LHZ (r , base , i ) EMIT(PPC_INST_LHZ | ___PPC_RT (r) | \
94+ ___PPC_RA (base) | IMM_L(i))
9595/* Convenience helpers for the above with 'far' offsets: */
9696#define PPC_LD_OFFS (r , base , i ) do { if ((i) < 32768) PPC_LD(r, base, i); \
9797 else { PPC_ADDIS(r, base, IMM_HA(i)); \
@@ -105,52 +105,52 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
105105 else { PPC_ADDIS(r, base, IMM_HA(i)); \
106106 PPC_LHZ(r, r, IMM_L(i)); } } while(0)
107107
108- #define PPC_CMPWI (a , i ) EMIT(PPC_INST_CMPWI | __PPC_RA (a) | IMM_L(i))
109- #define PPC_CMPDI (a , i ) EMIT(PPC_INST_CMPDI | __PPC_RA (a) | IMM_L(i))
110- #define PPC_CMPLWI (a , i ) EMIT(PPC_INST_CMPLWI | __PPC_RA (a) | IMM_L(i))
111- #define PPC_CMPLW (a , b ) EMIT(PPC_INST_CMPLW | __PPC_RA (a) | __PPC_RB (b))
112-
113- #define PPC_SUB (d , a , b ) EMIT(PPC_INST_SUB | __PPC_RT (d) | \
114- __PPC_RB (a) | __PPC_RA (b))
115- #define PPC_ADD (d , a , b ) EMIT(PPC_INST_ADD | __PPC_RT (d) | \
116- __PPC_RA (a) | __PPC_RB (b))
117- #define PPC_MUL (d , a , b ) EMIT(PPC_INST_MULLW | __PPC_RT (d) | \
118- __PPC_RA (a) | __PPC_RB (b))
119- #define PPC_MULHWU (d , a , b ) EMIT(PPC_INST_MULHWU | __PPC_RT (d) | \
120- __PPC_RA (a) | __PPC_RB (b))
121- #define PPC_MULI (d , a , i ) EMIT(PPC_INST_MULLI | __PPC_RT (d) | \
122- __PPC_RA (a) | IMM_L(i))
123- #define PPC_DIVWU (d , a , b ) EMIT(PPC_INST_DIVWU | __PPC_RT (d) | \
124- __PPC_RA (a) | __PPC_RB (b))
125- #define PPC_AND (d , a , b ) EMIT(PPC_INST_AND | __PPC_RA (d) | \
126- __PPC_RS (a) | __PPC_RB (b))
127- #define PPC_ANDI (d , a , i ) EMIT(PPC_INST_ANDI | __PPC_RA (d) | \
128- __PPC_RS (a) | IMM_L(i))
129- #define PPC_AND_DOT (d , a , b ) EMIT(PPC_INST_ANDDOT | __PPC_RA (d) | \
130- __PPC_RS (a) | __PPC_RB (b))
131- #define PPC_OR (d , a , b ) EMIT(PPC_INST_OR | __PPC_RA (d) | \
132- __PPC_RS (a) | __PPC_RB (b))
133- #define PPC_ORI (d , a , i ) EMIT(PPC_INST_ORI | __PPC_RA (d) | \
134- __PPC_RS (a) | IMM_L(i))
135- #define PPC_ORIS (d , a , i ) EMIT(PPC_INST_ORIS | __PPC_RA (d) | \
136- __PPC_RS (a) | IMM_L(i))
137- #define PPC_SLW (d , a , s ) EMIT(PPC_INST_SLW | __PPC_RA (d) | \
138- __PPC_RS (a) | __PPC_RB (s))
139- #define PPC_SRW (d , a , s ) EMIT(PPC_INST_SRW | __PPC_RA (d) | \
140- __PPC_RS (a) | __PPC_RB (s))
108+ #define PPC_CMPWI (a , i ) EMIT(PPC_INST_CMPWI | ___PPC_RA (a) | IMM_L(i))
109+ #define PPC_CMPDI (a , i ) EMIT(PPC_INST_CMPDI | ___PPC_RA (a) | IMM_L(i))
110+ #define PPC_CMPLWI (a , i ) EMIT(PPC_INST_CMPLWI | ___PPC_RA (a) | IMM_L(i))
111+ #define PPC_CMPLW (a , b ) EMIT(PPC_INST_CMPLW | ___PPC_RA (a) | ___PPC_RB (b))
112+
113+ #define PPC_SUB (d , a , b ) EMIT(PPC_INST_SUB | ___PPC_RT (d) | \
114+ ___PPC_RB (a) | ___PPC_RA (b))
115+ #define PPC_ADD (d , a , b ) EMIT(PPC_INST_ADD | ___PPC_RT (d) | \
116+ ___PPC_RA (a) | ___PPC_RB (b))
117+ #define PPC_MUL (d , a , b ) EMIT(PPC_INST_MULLW | ___PPC_RT (d) | \
118+ ___PPC_RA (a) | ___PPC_RB (b))
119+ #define PPC_MULHWU (d , a , b ) EMIT(PPC_INST_MULHWU | ___PPC_RT (d) | \
120+ ___PPC_RA (a) | ___PPC_RB (b))
121+ #define PPC_MULI (d , a , i ) EMIT(PPC_INST_MULLI | ___PPC_RT (d) | \
122+ ___PPC_RA (a) | IMM_L(i))
123+ #define PPC_DIVWU (d , a , b ) EMIT(PPC_INST_DIVWU | ___PPC_RT (d) | \
124+ ___PPC_RA (a) | ___PPC_RB (b))
125+ #define PPC_AND (d , a , b ) EMIT(PPC_INST_AND | ___PPC_RA (d) | \
126+ ___PPC_RS (a) | ___PPC_RB (b))
127+ #define PPC_ANDI (d , a , i ) EMIT(PPC_INST_ANDI | ___PPC_RA (d) | \
128+ ___PPC_RS (a) | IMM_L(i))
129+ #define PPC_AND_DOT (d , a , b ) EMIT(PPC_INST_ANDDOT | ___PPC_RA (d) | \
130+ ___PPC_RS (a) | ___PPC_RB (b))
131+ #define PPC_OR (d , a , b ) EMIT(PPC_INST_OR | ___PPC_RA (d) | \
132+ ___PPC_RS (a) | ___PPC_RB (b))
133+ #define PPC_ORI (d , a , i ) EMIT(PPC_INST_ORI | ___PPC_RA (d) | \
134+ ___PPC_RS (a) | IMM_L(i))
135+ #define PPC_ORIS (d , a , i ) EMIT(PPC_INST_ORIS | ___PPC_RA (d) | \
136+ ___PPC_RS (a) | IMM_L(i))
137+ #define PPC_SLW (d , a , s ) EMIT(PPC_INST_SLW | ___PPC_RA (d) | \
138+ ___PPC_RS (a) | ___PPC_RB (s))
139+ #define PPC_SRW (d , a , s ) EMIT(PPC_INST_SRW | ___PPC_RA (d) | \
140+ ___PPC_RS (a) | ___PPC_RB (s))
141141/* slwi = rlwinm Rx, Ry, n, 0, 31-n */
142- #define PPC_SLWI (d , a , i ) EMIT(PPC_INST_RLWINM | __PPC_RA (d) | \
143- __PPC_RS (a) | __PPC_SH(i) | \
142+ #define PPC_SLWI (d , a , i ) EMIT(PPC_INST_RLWINM | ___PPC_RA (d) | \
143+ ___PPC_RS (a) | __PPC_SH(i) | \
144144 __PPC_MB(0) | __PPC_ME(31-(i)))
145145/* srwi = rlwinm Rx, Ry, 32-n, n, 31 */
146- #define PPC_SRWI (d , a , i ) EMIT(PPC_INST_RLWINM | __PPC_RA (d) | \
147- __PPC_RS (a) | __PPC_SH(32-(i)) | \
146+ #define PPC_SRWI (d , a , i ) EMIT(PPC_INST_RLWINM | ___PPC_RA (d) | \
147+ ___PPC_RS (a) | __PPC_SH(32-(i)) | \
148148 __PPC_MB(i) | __PPC_ME(31))
149149/* sldi = rldicr Rx, Ry, n, 63-n */
150- #define PPC_SLDI (d , a , i ) EMIT(PPC_INST_RLDICR | __PPC_RA (d) | \
151- __PPC_RS (a) | __PPC_SH(i) | \
150+ #define PPC_SLDI (d , a , i ) EMIT(PPC_INST_RLDICR | ___PPC_RA (d) | \
151+ ___PPC_RS (a) | __PPC_SH(i) | \
152152 __PPC_MB(63-(i)) | (((i) & 0x20) >> 4))
153- #define PPC_NEG (d , a ) EMIT(PPC_INST_NEG | __PPC_RT (d) | __PPC_RA (a))
153+ #define PPC_NEG (d , a ) EMIT(PPC_INST_NEG | ___PPC_RT (d) | ___PPC_RA (a))
154154
155155/* Long jump; (unconditional 'branch') */
156156#define PPC_JMP (dest ) EMIT(PPC_INST_BRANCH | \
0 commit comments