Don't know what you mean by your last posting (is the problem
resolved), otherwise:
I think you're mixing recompilation-time variables and execution-time
variables, the fpu top of stack pointer changes when executing
the recompiled code, so you can't use immediates (the %Id) here.
Maybe the following helps (don't know if it works):
gen_protectflags();
gen_load_host(&TOP,DREG(TMPB),4);
gen_dop_word(DOP_MOV,true,DREG(TMPW),DREG(TMPB));
gen_dop_word_imm(DOP_ADD,true,DREG(TMPW),decode.modrm.rm);
gen_dop_word_imm(DOP_AND,true,DREG(STACK),7);
gen_call_function((void*)&FPU_FADD,"%Dd%Dd",DREG(TMPB),DREG(TMPW));
Loads fpu.top, generates STV(sub==decode.modrm.rm) and
calls FPU_FADD (gen_releaseregs as needed).
@swaaye: if the game uses fpu-escapecodes very often, the
dditions from above should give a decent speed increase,
just add it to decode.h
wd