On 07/30/2018 12:11 PM, Aleksandar Markovic wrote: > case NM_P16_LB: > + rd = extract32(ctx->opcode, 0, 2); > + switch (extract32(ctx->opcode, 2, 2)) { ... > case NM_P16_LH: > + rd = extract32(ctx->opcode, 1, 2) << 1; > + switch ((extract32(ctx->opcode, 3, 1) << 1) | (ctx->opcode & 1)) { ... > case NM_LW16: > + rd = extract32(ctx->opcode, 0, 4) << 2; > + gen_ld(ctx, OPC_LW, rt, rs, rd);
Again, do not use RD to hold anything other than a register. In these cases and more through this patch, RD being set to the immediate offset to the memory operation. r~