diff options
author | Philippe Mathieu-Daudé | 2021-03-08 13:18:06 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé | 2021-03-13 23:43:04 +0100 |
commit | c27b4579371e5d8eaed54182243ece54c752a4e5 (patch) | |
tree | 8badd471f8fd27043c1b1a648bcb273f9478f90a /crypto/block-luks.c | |
parent | target/mips: Extract MXU code to new mxu_translate.c file (diff) | |
download | qemu-c27b4579371e5d8eaed54182243ece54c752a4e5.tar.gz qemu-c27b4579371e5d8eaed54182243ece54c752a4e5.tar.xz qemu-c27b4579371e5d8eaed54182243ece54c752a4e5.zip |
target/mips: Use gen_load_gpr[_hi]() when possible
Use gen_load_gpr[_hi]() instead of open coding it.
Patch generated using the following spatch script:
@gen_load_gpr@
identifier reg_idx;
expression tcg_reg;
@@
-if (reg_idx == 0) {
- tcg_gen_movi_tl(tcg_reg, 0);
-} else {
- tcg_gen_mov_tl(tcg_reg, cpu_gpr[reg_idx]);
-}
+gen_load_gpr(tcg_reg, reg_idx);
@gen_load_gpr_hi@
identifier reg_idx;
expression tcg_reg;
@@
-if (reg_idx == 0) {
- tcg_gen_movi_i64(tcg_reg, 0);
-} else {
- tcg_gen_mov_i64(tcg_reg, cpu_gpr_hi[reg_idx]);
-}
+gen_load_gpr_hi(tcg_reg, reg_idx);
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210308131604.460693-1-f4bug@amsat.org>
Diffstat (limited to 'crypto/block-luks.c')
0 files changed, 0 insertions, 0 deletions