diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-11-11 15:10:51 +1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-01-05 11:41:29 -0800 |
commit | 31fd884b2e53dc50328dd616667c745fc4808fd1 (patch) | |
tree | 5aa4e03bdf342f1ef697799e0a6a1c5c1338a8ad /include/tcg/tcg.h | |
parent | cb10bc63b70737eafaceac1bf1d97730ce6d3393 (diff) | |
download | qemu-31fd884b2e53dc50328dd616667c745fc4808fd1.zip qemu-31fd884b2e53dc50328dd616667c745fc4808fd1.tar.gz qemu-31fd884b2e53dc50328dd616667c745fc4808fd1.tar.bz2 |
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>
Diffstat (limited to 'include/tcg/tcg.h')
-rw-r--r-- | include/tcg/tcg.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index d430ea1..a6310b8 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -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; |