On 5/24/24 01:10, Paolo Bonzini wrote:
Mark cc_op as clean and do not spill it at the end of the translation block.
Technically this is a tiny bit less efficient, but:

* it results in translations that are a tiny bit smaller

* for most of these instructions, it is not unlikely that they are close to
the end of the basic block, in which case the spilling of cc_op would be
there anyway

* even in other cases, the cost is probably dwarfed by that of computing flags.

Signed-off-by: Paolo Bonzini<[email protected]>
---
  target/i386/ops_sse.h        |  8 ++++++++
  target/i386/tcg/fpu_helper.c |  2 ++
  target/i386/tcg/int_helper.c | 13 +++++++++----
  target/i386/tcg/seg_helper.c | 16 ++++++++--------
  target/i386/tcg/translate.c  | 12 ++++++------
  target/i386/tcg/emit.c.inc   | 22 +++++++++++-----------
  6 files changed, 44 insertions(+), 29 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

A helper to set both CC_SRC and CC_OP = EFLAGS might be nice, as well as beginning to remove the CC_* macros, and thus the implicit use of @env.


r~

Reply via email to