Lines Matching refs:env

31     struct uwx_env *env,
39 if (env == 0)
42 env->context.special[UWX_REG_IP] = ip;
43 env->context.special[UWX_REG_SP] = sp;
44 env->context.special[UWX_REG_BSP] = bsp;
45 env->context.special[UWX_REG_CFM] = cfm;
47 env->context.special[i] = 0;
49 env->context.gr[i] = 0;
50 env->context.valid_regs = VALID_BASIC4;
51 env->context.valid_frs = 0;
52 env->rstate = 0;
53 (void)uwx_init_history(env);
57 int uwx_get_reg(struct uwx_env *env, int regid, uint64_t *valp)
65 if (env == 0)
72 if (regid < NSPECIALREG && (env->context.valid_regs & (1 << regid)))
73 *valp = env->context.special[regid];
76 status = uwx_restore_markers(env);
79 *valp = env->context.special[regid];
82 (env->context.valid_regs &
84 *valp = env->context.gr[regid - UWX_REG_GR(4)];
86 if (env->copyin == 0)
88 bsp = env->context.special[UWX_REG_BSP];
91 sor = (((int) env->context.special[UWX_REG_CFM] >> 14) & 0x0f) * 8;
92 rrb_gr = ((int) env->context.special[UWX_REG_CFM] >> 18) & 0x7f;
98 n = (*env->copyin)(UWX_COPYIN_RSTACK, (char *)valp,
99 bsp, DWORDSZ, env->cb_token);
106 (env->context.valid_regs &
108 *valp = env->context.br[regid - UWX_REG_BR(1)];
110 (env->context.valid_frs & (1 << (regid - UWX_REG_FR(2)))) ) {
111 valp[0] = env->context.fr[regid - UWX_REG_FR(2)].part0;
112 valp[1] = env->context.fr[regid - UWX_REG_FR(2)].part1;
115 (env->context.valid_frs & (1 << (regid - UWX_REG_FR(16) + 4))) ) {
116 valp[0] = env->context.fr[regid - UWX_REG_FR(16) + 4].part0;
117 valp[1] = env->context.fr[regid - UWX_REG_FR(16) + 4].part1;
122 if (env->copyin == 0)
124 n = (*env->copyin)(UWX_COPYIN_REG, (char *)valp,
125 regid, DWORDSZ, env->cb_token);
130 if (env->copyin == 0)
132 n = (*env->copyin)(UWX_COPYIN_REG, (char *)valp,
133 regid, 2*DWORDSZ, env->cb_token);
150 int uwx_get_nat(struct uwx_env *env, int regid, int *natp)
160 if (env == 0)
166 (env->context.valid_regs &
168 *natp = (env->context.special[UWX_REG_PRIUNAT] >>
172 if (env->copyin == 0)
174 bsp = env->context.special[UWX_REG_BSP];
176 sor = (((int) env->context.special[UWX_REG_CFM] >> 14) & 0x0f) * 8;
177 rrb_gr = ((int) env->context.special[UWX_REG_CFM] >> 18) & 0x7f;
183 n = (*env->copyin)(UWX_COPYIN_RSTACK, (char *)&natcoll,
184 natcollp, DWORDSZ, env->cb_token);
196 int uwx_get_spill_loc(struct uwx_env *env, int regid, uint64_t *dispp)
203 if (env == 0)
213 if (!(env->context.valid_regs & (1 << regid))) {
214 status = uwx_restore_markers(env);
219 *dispp = env->history.special[regid];
222 *dispp = env->history.gr[regid - UWX_REG_GR(4)];
224 bsp = env->context.special[UWX_REG_BSP];
226 sor = (((int) env->context.special[UWX_REG_CFM] >> 14) & 0x0f) * 8;
227 rrb_gr = ((int) env->context.special[UWX_REG_CFM] >> 18) & 0x7f;
234 *dispp = env->history.br[regid - UWX_REG_BR(1)];
236 *dispp = env->history.fr[regid - UWX_REG_FR(2)];
238 *dispp = env->history.fr[regid - UWX_REG_FR(16) + 4];
248 int uwx_set_reg(struct uwx_env *env, int regid, uint64_t val)
252 if (env == 0)
258 env->context.special[regid] = val;
259 env->context.valid_regs |= 1 << regid;
263 env->context.gr[regid - UWX_REG_GR(4)] = val;
264 env->context.valid_regs |=
272 env->context.br[regid - UWX_REG_BR(1)] = val;
273 env->context.valid_regs |=
282 int uwx_set_fr(struct uwx_env *env, int regid, uint64_t *val)
292 env->context.fr[regid].part0 = val[0];
293 env->context.fr[regid].part1 = val[1];
294 env->context.valid_frs |= 1 << regid;
295 env->nsbreg = NSBREG;