[03/40] sim/aarch64: Remove unused functions

Message ID 796962a87e569feeafb5ef636de3c79000ae152c.1666258361.git.research_trasio@irq.a4lg.com
State Committed
Commit 36edbb454fc9e720e723923d549b9f5356657a73
Headers
Series sim+gdb: Suppress warnings if built with Clang (big batch 1) |

Commit Message

Tsukasa OI Oct. 20, 2022, 9:32 a.m. UTC
  Clang generates a warning if there is a unused static function
("-Wunused-function").  On the default configuration, it causes a build
failure (unless "--disable-werror" is specified).

This commit removes unused functions from the AArch64 simulator.
---
 sim/aarch64/simulator.c | 16 ----------------
 1 file changed, 16 deletions(-)
  

Comments

Mike Frysinger Oct. 23, 2022, 2:02 p.m. UTC | #1
looks fine, but Andrew Burgess posted the same fix
-mike
  
Tsukasa OI Oct. 24, 2022, 10:55 a.m. UTC | #2
On 2022/10/23 23:02, Mike Frysinger wrote:
> looks fine, but Andrew Burgess posted the same fix
> -mike

I'll leave it for Andrew and I will withdraw following patches from my
patchset:

-   PATCH 03/40
-   PATCH 15/40
-   PATCH 16/40 (wrote by Andrew)
-   PATCH 28/40
-   PATCH 30/40
-   PATCH 36/40

Because this patchset (intended to be a RFC PATCH) is a mere copy of my
working branch, I need to sync with Andrew's work.

Thanks,
Tsukasa
  

Patch

diff --git a/sim/aarch64/simulator.c b/sim/aarch64/simulator.c
index 516a7830522..5881725cefd 100644
--- a/sim/aarch64/simulator.c
+++ b/sim/aarch64/simulator.c
@@ -83,22 +83,6 @@ 
     }									\
   while (0)
 
-/* Helper functions used by expandLogicalImmediate.  */
-
-/* for i = 1, ... N result<i-1> = 1 other bits are zero  */
-static inline uint64_t
-ones (int N)
-{
-  return (N == 64 ? (uint64_t)-1UL : ((1UL << N) - 1));
-}
-
-/* result<0> to val<N>  */
-static inline uint64_t
-pickbit (uint64_t val, int N)
-{
-  return pickbits64 (val, N, N);
-}
-
 static uint64_t
 expand_logical_immediate (uint32_t S, uint32_t R, uint32_t N)
 {