diff mbox

target-microblaze: Delete unused sign_extend() function

Message ID 1401818361-1581-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell June 3, 2014, 5:59 p.m. UTC
The sign_extend() function is unused; delete it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
We have sextract() for this these days anyway.
---
 target-microblaze/translate.c | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Edgar E. Iglesias June 4, 2014, 7:13 a.m. UTC | #1
On Tue, Jun 03, 2014 at 06:59:21PM +0100, Peter Maydell wrote:
> The sign_extend() function is unused; delete it.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

Peter, feel free to push this straight in.

Thanks,
Edgar

> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> We have sextract() for this these days anyway.
> ---
>  target-microblaze/translate.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
> index 488df2d..50c214b 100644
> --- a/target-microblaze/translate.c
> +++ b/target-microblaze/translate.c
> @@ -98,19 +98,6 @@ static const char *special_regnames[] =
>      "sr16", "sr17", "sr18"
>  };
>  
> -/* Sign extend at translation time.  */
> -static inline int sign_extend(unsigned int val, unsigned int width)
> -{
> -        int sval;
> -
> -        /* LSL.  */
> -        val <<= 31 - width;
> -        sval = val;
> -        /* ASR.  */
> -        sval >>= 31 - width;
> -        return sval;
> -}
> -
>  static inline void t_sync_flags(DisasContext *dc)
>  {
>      /* Synch the tb dependent flags between translator and runtime.  */
> -- 
> 1.9.2
>
Michael Tokarev June 8, 2014, 11:03 a.m. UTC | #2
Applied to -trivial, thanks!

/mjt
diff mbox

Patch

diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index 488df2d..50c214b 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -98,19 +98,6 @@  static const char *special_regnames[] =
     "sr16", "sr17", "sr18"
 };
 
-/* Sign extend at translation time.  */
-static inline int sign_extend(unsigned int val, unsigned int width)
-{
-        int sval;
-
-        /* LSL.  */
-        val <<= 31 - width;
-        sval = val;
-        /* ASR.  */
-        sval >>= 31 - width;
-        return sval;
-}
-
 static inline void t_sync_flags(DisasContext *dc)
 {
     /* Synch the tb dependent flags between translator and runtime.  */