[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 33/43] target/ppc: Remove single use static inline function
|
From: |
BALATON Zoltan |
|
Subject: |
[PATCH 33/43] target/ppc: Remove single use static inline function |
|
Date: |
Mon, 27 May 2024 01:13:09 +0200 (CEST) |
The ger_pack_masks() function is only used once and the inverse of
this operation is already inlined so it can be inlined too in the only
caller and removed from the header.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
target/ppc/internal.h | 9 ---------
target/ppc/translate/vsx-impl.c.inc | 6 ++++--
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/target/ppc/internal.h b/target/ppc/internal.h
index 20fb2ec593..8e5a241f74 100644
--- a/target/ppc/internal.h
+++ b/target/ppc/internal.h
@@ -293,13 +293,4 @@ FIELD(GER_MSK, XMSK, 0, 4)
FIELD(GER_MSK, YMSK, 4, 4)
FIELD(GER_MSK, PMSK, 8, 8)
-static inline int ger_pack_masks(int pmsk, int ymsk, int xmsk)
-{
- int msk = 0;
- msk = FIELD_DP32(msk, GER_MSK, XMSK, xmsk);
- msk = FIELD_DP32(msk, GER_MSK, YMSK, ymsk);
- msk = FIELD_DP32(msk, GER_MSK, PMSK, pmsk);
- return msk;
-}
-
#endif /* PPC_INTERNAL_H */
diff --git a/target/ppc/translate/vsx-impl.c.inc
b/target/ppc/translate/vsx-impl.c.inc
index 0266f09119..62950d348a 100644
--- a/target/ppc/translate/vsx-impl.c.inc
+++ b/target/ppc/translate/vsx-impl.c.inc
@@ -2819,7 +2819,7 @@ static bool trans_XXSETACCZ(DisasContext *ctx, arg_X_a *a)
static bool do_ger(DisasContext *ctx, arg_MMIRR_XX3 *a,
void (*helper)(TCGv_env, TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_i32))
{
- uint32_t mask;
+ uint32_t mask = 0;
TCGv_ptr xt, xa, xb;
REQUIRE_INSNS_FLAGS2(ctx, ISA310);
REQUIRE_VSX(ctx);
@@ -2832,7 +2832,9 @@ static bool do_ger(DisasContext *ctx, arg_MMIRR_XX3 *a,
xa = gen_vsr_ptr(a->xa);
xb = gen_vsr_ptr(a->xb);
- mask = ger_pack_masks(a->pmsk, a->ymsk, a->xmsk);
+ mask = FIELD_DP32(mask, GER_MSK, XMSK, a->xmsk);
+ mask = FIELD_DP32(mask, GER_MSK, YMSK, a->ymsk);
+ mask = FIELD_DP32(mask, GER_MSK, PMSK, a->pmsk);
helper(tcg_env, xa, xb, xt, tcg_constant_i32(mask));
return true;
}
--
2.30.9
- [PATCH 20/43] target/ppc/mmu_common.c: Init variable in function that relies on it, (continued)
- [PATCH 20/43] target/ppc/mmu_common.c: Init variable in function that relies on it, BALATON Zoltan, 2024/05/26
- [PATCH 05/43] target/ppc/mmu_common.c: Remove another single use local variable, BALATON Zoltan, 2024/05/26
- [PATCH 17/43] target/ppc/mmu_common.c: Remove ptem field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 21/43] target/ppc/mmu_common.c: Remove key field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 24/43] target/ppc/mmu_common.c: Use defines instead of numeric constants, BALATON Zoltan, 2024/05/26
- [PATCH 07/43] target/ppc/mmu_common.c: Return directly in ppc6xx_tlb_pte_check(), BALATON Zoltan, 2024/05/26
- [PATCH 09/43] target/ppc/mmu_common.c: Remove unused field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 10/43] target/ppc/mmu_common.c: Remove hash field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 27/43] target/ppc/mmu_common.c: Remove mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 30/43] target/ppc: Unexport some functions from mmu-book3s-v3.h, BALATON Zoltan, 2024/05/26
- [PATCH 33/43] target/ppc: Remove single use static inline function,
BALATON Zoltan <=
- [PATCH 11/43] target/ppc/mmu_common.c: Remove pte_update_flags(), BALATON Zoltan, 2024/05/26
- [PATCH 28/43] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_raddr(), BALATON Zoltan, 2024/05/26
- [PATCH 31/43] target/ppc/mmu-radix64: Remove externally unused parts from header, BALATON Zoltan, 2024/05/26
- [PATCH 34/43] target/ppc/internal.h: Consolidate ifndef CONFIG_USER_ONLY blocks, BALATON Zoltan, 2024/05/26
- [PATCH 12/43] target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 14/43] target/ppc/mmu_common.c: Remove single use local variable, BALATON Zoltan, 2024/05/26
- [PATCH 39/43] target/ppc: Change parameter type of some inline functions, BALATON Zoltan, 2024/05/26
- [PATCH 41/43] target/ppc: Change MMU xlate functions to take CPUState, BALATON Zoltan, 2024/05/26
- [PATCH 23/43] target/ppc/mmu_common.c: Rename function parameter, BALATON Zoltan, 2024/05/26
- [PATCH 22/43] target/ppc/mmu_common.c: Stop using ctx in ppc6xx_tlb_check(), BALATON Zoltan, 2024/05/26