-
Notifications
You must be signed in to change notification settings - Fork 2
iss: Optimize TB chaining and exiting #865
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestissThis is ISS relatedThis is ISS relatedoptimizationThis is an optimization of an existing featureThis is an optimization of an existing feature
Description
During the translation of the guest instructions to TCG operations, it is sometimes necessary to end the translation block and generate certain TCG instructions. The following operations may be generated and require a translation block end:
- direct jump
- end the TB, PC changes
- here we can chain the TBs together with jumpslots
- indirect jump
- end the TB, PC changes
- here we need to generate a TB lookup, because the next PC is not known during translation
- write to a register that changes the TB-state (static)
- end the TB, because the TB-state changes
- the next pc and TB-state is known during translation, so we can chain and use jumpslots
- write to a register that changes the TB-state (dynamic)
- end the TB, because the TB-state changes
- here we need to generate a TB lookup, because the next TB-state is not known during translation
During a single instruction, any combination of these things may happen. Whether they happen may or may not be known during translation since the condition can depend on purely statically known things (constants and registers that are part of the TB-state). Eg if an indirect jump only happens under a condition that is known to be false during translation, then the TB does not need to end.
Currently our solution is very conservative (TBs are often unnecessarily ended and chaining is not always used).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestissThis is ISS relatedThis is ISS relatedoptimizationThis is an optimization of an existing featureThis is an optimization of an existing feature