On 12/31/2011 10:50 PM, Peter Maydell wrote: >> +static void gen_logic_imm (CPUState *env, DisasContext *ctx, uint32_t opc, >> + int rt, int rs, int16_t imm) >> { >> target_ulong uimm; >> const char *opn = "imm logic"; > > Am I missing something, or does gen_logic_imm() not actually use env at all? > Maybe we should be replacing env with ctx in the parameter list in some/most > of these functions rather than adding it?
You're not missing anything. Really, env should not be used by anything in that file except for the outermost gen_intermediate_code_internal, which already copies the bits that are needed to the ctx. Cleaning up incorrect uses of env throughout that file is a larger job. r~