mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
tcg: Use output_pref wrapper function
We will shortly have the possibility of more that two outputs, though only for calls (for which preferences are moot). Avoid direct references to op->output_pref[] when possible. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
cb10bc63b7
commit
31fd884b2e
2 changed files with 23 additions and 16 deletions
|
@ -518,6 +518,11 @@ typedef struct TCGOp {
|
|||
/* Make sure operands fit in the bitfields above. */
|
||||
QEMU_BUILD_BUG_ON(NB_OPS > (1 << 8));
|
||||
|
||||
static inline TCGRegSet output_pref(const TCGOp *op, unsigned i)
|
||||
{
|
||||
return i < ARRAY_SIZE(op->output_pref) ? op->output_pref[i] : 0;
|
||||
}
|
||||
|
||||
typedef struct TCGProfile {
|
||||
int64_t cpu_exec_time;
|
||||
int64_t tb_count1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue