> > That's exactly what my gcc4 hacks do. > > > > It gets complicated because a x86 uses variable length insn encodings so > > you don't know where insn boundaries are, and a jmp instruction is larger > > than a ret instruction so it's not always possible to do a straight > > replacement. > > how about > > void some_generated_instruction(u32 a1, u32 s2) > { > // code > asm volatile ( "" ); > } > > > that will force the code to fall through to the null asm code, avoiding > premature returns. > > if the code uses 'return' explicitly, turn it to a goto just before the > 'asm volatile'.
We already do that. It doesn't stop gcc putting the return in the middle of the function. Paul _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel