Lines Matching refs:i
84 #define IMM_H(i) ((uintptr_t)(i)>>16) argument
85 #define IMM_HA(i) (((uintptr_t)(i)>>16) + \ argument
86 (((uintptr_t)(i) & 0x8000) >> 15))
87 #define IMM_L(i) ((uintptr_t)(i) & 0xffff) argument
97 #define PPC_ADDI(d, a, i) EMIT(PPC_INST_ADDI | ___PPC_RT(d) | \ argument
98 ___PPC_RA(a) | IMM_L(i))
100 #define PPC_LI(r, i) PPC_ADDI(r, 0, i) argument
101 #define PPC_ADDIS(d, a, i) EMIT(PPC_INST_ADDIS | \ argument
102 ___PPC_RS(d) | ___PPC_RA(a) | IMM_L(i))
103 #define PPC_LIS(r, i) PPC_ADDIS(r, 0, i) argument
104 #define PPC_STD(r, base, i) EMIT(PPC_INST_STD | ___PPC_RS(r) | \ argument
105 ___PPC_RA(base) | ((i) & 0xfffc))
106 #define PPC_STDU(r, base, i) EMIT(PPC_INST_STDU | ___PPC_RS(r) | \ argument
107 ___PPC_RA(base) | ((i) & 0xfffc))
108 #define PPC_STW(r, base, i) EMIT(PPC_INST_STW | ___PPC_RS(r) | \ argument
109 ___PPC_RA(base) | ((i) & 0xfffc))
110 #define PPC_STWU(r, base, i) EMIT(PPC_INST_STWU | ___PPC_RS(r) | \ argument
111 ___PPC_RA(base) | ((i) & 0xfffc))
113 #define PPC_LBZ(r, base, i) EMIT(PPC_INST_LBZ | ___PPC_RT(r) | \ argument
114 ___PPC_RA(base) | IMM_L(i))
115 #define PPC_LD(r, base, i) EMIT(PPC_INST_LD | ___PPC_RT(r) | \ argument
116 ___PPC_RA(base) | IMM_L(i))
117 #define PPC_LWZ(r, base, i) EMIT(PPC_INST_LWZ | ___PPC_RT(r) | \ argument
118 ___PPC_RA(base) | IMM_L(i))
119 #define PPC_LHZ(r, base, i) EMIT(PPC_INST_LHZ | ___PPC_RT(r) | \ argument
120 ___PPC_RA(base) | IMM_L(i))
125 #define PPC_BPF_LL(r, base, i) do { PPC_LD(r, base, i); } while(0) argument
126 #define PPC_BPF_STL(r, base, i) do { PPC_STD(r, base, i); } while(0) argument
127 #define PPC_BPF_STLU(r, base, i) do { PPC_STDU(r, base, i); } while(0) argument
129 #define PPC_BPF_LL(r, base, i) do { PPC_LWZ(r, base, i); } while(0) argument
130 #define PPC_BPF_STL(r, base, i) do { PPC_STW(r, base, i); } while(0) argument
131 #define PPC_BPF_STLU(r, base, i) do { PPC_STWU(r, base, i); } while(0) argument
135 #define PPC_LBZ_OFFS(r, base, i) do { if ((i) < 32768) PPC_LBZ(r, base, i); \ argument
136 else { PPC_ADDIS(r, base, IMM_HA(i)); \
137 PPC_LBZ(r, r, IMM_L(i)); } } while(0)
139 #define PPC_LD_OFFS(r, base, i) do { if ((i) < 32768) PPC_LD(r, base, i); \ argument
140 else { PPC_ADDIS(r, base, IMM_HA(i)); \
141 PPC_LD(r, r, IMM_L(i)); } } while(0)
143 #define PPC_LWZ_OFFS(r, base, i) do { if ((i) < 32768) PPC_LWZ(r, base, i); \ argument
144 else { PPC_ADDIS(r, base, IMM_HA(i)); \
145 PPC_LWZ(r, r, IMM_L(i)); } } while(0)
147 #define PPC_LHZ_OFFS(r, base, i) do { if ((i) < 32768) PPC_LHZ(r, base, i); \ argument
148 else { PPC_ADDIS(r, base, IMM_HA(i)); \
149 PPC_LHZ(r, r, IMM_L(i)); } } while(0)
152 #define PPC_LL_OFFS(r, base, i) do { PPC_LD_OFFS(r, base, i); } while(0) argument
154 #define PPC_LL_OFFS(r, base, i) do { PPC_LWZ_OFFS(r, base, i); } while(0) argument
174 #define PPC_CMPWI(a, i) EMIT(PPC_INST_CMPWI | ___PPC_RA(a) | IMM_L(i)) argument
175 #define PPC_CMPDI(a, i) EMIT(PPC_INST_CMPDI | ___PPC_RA(a) | IMM_L(i)) argument
176 #define PPC_CMPLWI(a, i) EMIT(PPC_INST_CMPLWI | ___PPC_RA(a) | IMM_L(i)) argument
187 #define PPC_MULI(d, a, i) EMIT(PPC_INST_MULLI | ___PPC_RT(d) | \ argument
188 ___PPC_RA(a) | IMM_L(i))
193 #define PPC_ANDI(d, a, i) EMIT(PPC_INST_ANDI | ___PPC_RA(d) | \ argument
194 ___PPC_RS(a) | IMM_L(i))
199 #define PPC_ORI(d, a, i) EMIT(PPC_INST_ORI | ___PPC_RA(d) | \ argument
200 ___PPC_RS(a) | IMM_L(i))
201 #define PPC_ORIS(d, a, i) EMIT(PPC_INST_ORIS | ___PPC_RA(d) | \ argument
202 ___PPC_RS(a) | IMM_L(i))
205 #define PPC_XORI(d, a, i) EMIT(PPC_INST_XORI | ___PPC_RA(d) | \ argument
206 ___PPC_RS(a) | IMM_L(i))
207 #define PPC_XORIS(d, a, i) EMIT(PPC_INST_XORIS | ___PPC_RA(d) | \ argument
208 ___PPC_RS(a) | IMM_L(i))
214 #define PPC_SLWI(d, a, i) EMIT(PPC_INST_RLWINM | ___PPC_RA(d) | \ argument
215 ___PPC_RS(a) | __PPC_SH(i) | \
216 __PPC_MB(0) | __PPC_ME(31-(i)))
218 #define PPC_SRWI(d, a, i) EMIT(PPC_INST_RLWINM | ___PPC_RA(d) | \ argument
219 ___PPC_RS(a) | __PPC_SH(32-(i)) | \
220 __PPC_MB(i) | __PPC_ME(31))
222 #define PPC_SLDI(d, a, i) EMIT(PPC_INST_RLDICR | ___PPC_RA(d) | \ argument
223 ___PPC_RS(a) | __PPC_SH(i) | \
224 __PPC_MB(63-(i)) | (((i) & 0x20) >> 4))
235 #define PPC_LI32(d, i) do { PPC_LI(d, IMM_L(i)); \ argument
236 if ((u32)(uintptr_t)(i) >= 32768) { \
237 PPC_ADDIS(d, d, IMM_HA(i)); \
239 #define PPC_LI64(d, i) do { \ argument
240 if (!((uintptr_t)(i) & 0xffffffff00000000ULL)) \
241 PPC_LI32(d, i); \
243 PPC_LIS(d, ((uintptr_t)(i) >> 48)); \
244 if ((uintptr_t)(i) & 0x0000ffff00000000ULL) \
246 ((uintptr_t)(i) >> 32) & 0xffff); \
248 if ((uintptr_t)(i) & 0x00000000ffff0000ULL) \
250 ((uintptr_t)(i) >> 16) & 0xffff); \
251 if ((uintptr_t)(i) & 0x000000000000ffffULL) \
252 PPC_ORI(d, d, (uintptr_t)(i) & 0xffff); \
256 #define PPC_FUNC_ADDR(d,i) do { PPC_LI64(d, i); } while(0) argument
258 #define PPC_FUNC_ADDR(d,i) do { PPC_LI32(d, i); } while(0) argument
261 #define PPC_LHBRX_OFFS(r, base, i) \ argument
262 do { PPC_LI32(r, i); PPC_LHBRX(r, r, base); } while(0)
264 #define PPC_NTOHS_OFFS(r, base, i) PPC_LHBRX_OFFS(r, base, i) argument
266 #define PPC_NTOHS_OFFS(r, base, i) PPC_LHZ_OFFS(r, base, i) argument