target-ppc: fix unused-function warnings
cover target-ppc: fix unused-function warnings
These patches for target-ppc fix clang 3.4 warnings about 'static inline' functions which are defined but never used.
(Incidentally, "d" is a terrible name for a function, so we're well rid of that one :-))
thanks
-- PMM
Peter Maydell (2):
target-ppc: Remove unused IMM and d extract helpers
target-ppc: Remove unused gen_qemu_ld8s()
target-ppc/translate.c | 8 -------- 1 file changed, 8 deletions(-)
Signature · 1 line
2.0.0
PATCH 1/2 target-ppc: Remove unused IMM and d extract helpers
Remove the definition of the IMM and d extract helpers; these seem to have been added as part of the initial PPC support in 2003 but never actually used.
--- target-ppc/translate.c | 3 --- 1 file changed, 3 deletions(-)
target-ppc/translate.c +0 -3
@@ -426,7 +426,6 @@ static inline uint32_t SPR(uint32_t opcode)return ((sprn >>5 ) &0x1F ) | ((sprn &0x1F ) <<5 ); }/*** Get constants ***/ -EXTRACT_HELPER (IMM ,12 ,8 );/* 16 bits signed immediate value */ EXTRACT_SHELPER (SIMM ,0 ,16 );/* 16 bits unsigned immediate value */
@@ -459,8 +458,6 @@ EXTRACT_HELPER(FPFLM, 17, 8);EXTRACT_HELPER (FPW ,16 ,1 );/*** Jump target decoding ***/ -/* Displacement */ -EXTRACT_SHELPER (d,0 ,16 );/* Immediate address */ static inline target_ulong LI (uint32_t opcode) {
Signature · 1 line
2.0.0
PATCH 2/2 target-ppc: Remove unused gen_qemu_ld8s()
In reply to Peter MaydellThe gen_qemu_ld8s() function is unused; remove it.
--- target-ppc/translate.c | 5 ----- 1 file changed, 5 deletions(-)
target-ppc/translate.c +0 -5
@@ -2662,11 +2662,6 @@ static inline void gen_qemu_ld8u(DisasContext *ctx, TCGv arg1, TCGv arg2)tcg_gen_qemu_ld8u (arg1, arg2, ctx->mem_idx); } -static inline void gen_qemu_ld8s (DisasContext *ctx,TCGv arg1,TCGv arg2) -{ -tcg_gen_qemu_ld8s (arg1, arg2, ctx->mem_idx); -} -static inline void gen_qemu_ld16u (DisasContext *ctx,TCGv arg1,TCGv arg2) {TCGMemOp op =MO_UW | ctx->default_tcg_memop_mask;
Signature · 1 line
2.0.0
Alexander Graf
AppliedQuoted 5 lines · Peter Maydell
These patches for target-ppc fix clang 3.4 warnings about 'static inline' functions which are defined but never used.
(Incidentally, "d" is a terrible name for a function, so we're well rid of that one :-))
Thanks, applied to ppc-next :).
As for "d" - that's unfortunately how the spec calls the field ;).
Alex