[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/45] target/hppa: Always make a copy in do_ibranch_priv
From: |
Richard Henderson |
Subject: |
[PATCH 16/45] target/hppa: Always make a copy in do_ibranch_priv |
Date: |
Wed, 24 Apr 2024 16:59:54 -0700 |
This simplifies callers, which might otherwise have
to make another copy.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/translate.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 7e01c21141..dd5193cb6a 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -1966,18 +1966,17 @@ static bool do_ibranch(DisasContext *ctx, TCGv_i64
dest, TCGv_i64 dspc,
*/
static TCGv_i64 do_ibranch_priv(DisasContext *ctx, TCGv_i64 offset)
{
- TCGv_i64 dest;
+ TCGv_i64 dest = tcg_temp_new_i64();
switch (ctx->privilege) {
case 0:
/* Privilege 0 is maximum and is allowed to decrease. */
- return offset;
+ tcg_gen_mov_i64(dest, offset);
+ break;
case 3:
/* Privilege 3 is minimum and is never allowed to increase. */
- dest = tcg_temp_new_i64();
tcg_gen_ori_i64(dest, offset, 3);
break;
default:
- dest = tcg_temp_new_i64();
tcg_gen_andi_i64(dest, offset, -4);
tcg_gen_ori_i64(dest, dest, ctx->privilege);
tcg_gen_umax_i64(dest, dest, offset);
--
2.34.1
- [PATCH 00/45] target/hppa: Misc improvements, Richard Henderson, 2024/04/24
- [PATCH 02/45] target/hppa: Use hppa_form_gva_psw in hppa_cpu_get_pc, Richard Henderson, 2024/04/24
- [PATCH 01/45] target/hppa: Move cpu_get_tb_cpu_state out of line, Richard Henderson, 2024/04/24
- [PATCH 08/45] target/hppa: Add install_link, Richard Henderson, 2024/04/24
- [PATCH 06/45] target/hppa: Use CF_BP_PAGE instead of cpu_breakpoint_test, Richard Henderson, 2024/04/24
- [PATCH 16/45] target/hppa: Always make a copy in do_ibranch_priv,
Richard Henderson <=
- [PATCH 18/45] target/hppa: Use displacements in DisasIAQE, Richard Henderson, 2024/04/24
- [PATCH 24/45] target/hppa: Use TCG_COND_TST* in trans_bb_imm, Richard Henderson, 2024/04/24
- [PATCH 27/45] target/hppa: Remove cond_free, Richard Henderson, 2024/04/24
- [PATCH 03/45] target/hppa: Move constant destination check into use_goto_tb, Richard Henderson, 2024/04/24
- [PATCH 05/45] target/hppa: Allow prior nullification in do_ibranch, Richard Henderson, 2024/04/24
- [PATCH 13/45] target/hppa: Add space arguments to install_iaq_entries, Richard Henderson, 2024/04/24
- [PATCH 10/45] target/hppa: Skip nullified insns in unconditional dbranch path, Richard Henderson, 2024/04/24
- [PATCH 15/45] target/hppa: Use umax in do_ibranch_priv, Richard Henderson, 2024/04/24
- [PATCH 20/45] target/hppa: Use TCG_COND_TST* in do_cond, Richard Henderson, 2024/04/24
- [PATCH 19/45] target/hppa: Rename cond_make_* helpers, Richard Henderson, 2024/04/24