Re: [PATCH 19/20] disas/nanomips: Add modifier static

2022-08-27 Thread Thomas Huth

On 15/08/2022 09.26, Milica Lazarevic wrote:

Modifier static has been added to the remaining functions that shouldn't
be used outside of the nanomips disassembler.

Signed-off-by: Milica Lazarevic 
---
  disas/nanomips.cpp | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)



Reviewed-by: Thomas Huth 




Re: [PATCH 19/20] disas/nanomips: Add modifier static

2022-08-18 Thread Milica Lazarevic
Yes, it should. I'll squash it in the next version, thanks.

Milica

From: Philippe Mathieu-Daudé  on behalf of 
Philippe Mathieu-Daudé 
Sent: Tuesday, August 16, 2022 2:22 AM
To: Milica Lazarevic ; th...@redhat.com 

Cc: qemu-devel@nongnu.org ; cfont...@suse.de 
; berra...@redhat.com ; 
pbonz...@redhat.com ; vince.delvecc...@mediatek.com 
; richard.hender...@linaro.org 
; peter.mayd...@linaro.org 
; Djordje Todorovic ; 
mips3...@gmail.com ; Dragan Mladjenovic 

Subject: Re: [PATCH 19/20] disas/nanomips: Add modifier static

On 15/8/22 09:26, Milica Lazarevic wrote:
> Modifier static has been added to the remaining functions that shouldn't
> be used outside of the nanomips disassembler.
>
> Signed-off-by: Milica Lazarevic 
> ---
>   disas/nanomips.cpp | 8 
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
> index e7d6bffe84..6cb527d1f7 100644
> --- a/disas/nanomips.cpp
> +++ b/disas/nanomips.cpp
> @@ -114,13 +114,13 @@ static const char *to_string(img_address a)
>   }
>
>
> -uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size)
> +static uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size)
>   {
>   return (data << (64 - (bit_size + bit_offset))) >> (64 - bit_size);
>   }
>
>
> -int64 sign_extend(int64 data, int msb)
> +static int64 sign_extend(int64 data, int msb)
>   {
>   uint64 shift = 63 - msb;
>   return (data << shift) >> shift;
> @@ -463,7 +463,7 @@ static uint64 encode_shift3_from_shift(uint64 d)
>
>
>   /* special value for load literal */
> -int64 encode_eu_from_s_li16(uint64 d)
> +static int64 encode_eu_from_s_li16(uint64 d)
>   {
>   IMGASSERTONCE(d < 128);
>   return d == 127 ? -1 : (int64)d;
> @@ -22780,7 +22780,7 @@ static struct Pool MAJOR[2] = {
>   };
>
>
> -int nanomips_dis(char *buf,
> +static int nanomips_dis(char *buf,
>unsigned address,
>unsigned short one,
>unsigned short two,

This seems to belong to patch #4 "Remove helper methods from class",
shouldn't this be squashed there?


Re: [PATCH 19/20] disas/nanomips: Add modifier static

2022-08-15 Thread Philippe Mathieu-Daudé via

On 15/8/22 09:26, Milica Lazarevic wrote:

Modifier static has been added to the remaining functions that shouldn't
be used outside of the nanomips disassembler.

Signed-off-by: Milica Lazarevic 
---
  disas/nanomips.cpp | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index e7d6bffe84..6cb527d1f7 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -114,13 +114,13 @@ static const char *to_string(img_address a)
  }
  
  
-uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size)

+static uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size)
  {
  return (data << (64 - (bit_size + bit_offset))) >> (64 - bit_size);
  }
  
  
-int64 sign_extend(int64 data, int msb)

+static int64 sign_extend(int64 data, int msb)
  {
  uint64 shift = 63 - msb;
  return (data << shift) >> shift;
@@ -463,7 +463,7 @@ static uint64 encode_shift3_from_shift(uint64 d)
  
  
  /* special value for load literal */

-int64 encode_eu_from_s_li16(uint64 d)
+static int64 encode_eu_from_s_li16(uint64 d)
  {
  IMGASSERTONCE(d < 128);
  return d == 127 ? -1 : (int64)d;
@@ -22780,7 +22780,7 @@ static struct Pool MAJOR[2] = {
  };
  
  
-int nanomips_dis(char *buf,

+static int nanomips_dis(char *buf,
   unsigned address,
   unsigned short one,
   unsigned short two,


This seems to belong to patch #4 "Remove helper methods from class",
shouldn't this be squashed there?



[PATCH 19/20] disas/nanomips: Add modifier static

2022-08-15 Thread Milica Lazarevic
Modifier static has been added to the remaining functions that shouldn't
be used outside of the nanomips disassembler.

Signed-off-by: Milica Lazarevic 
---
 disas/nanomips.cpp | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index e7d6bffe84..6cb527d1f7 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -114,13 +114,13 @@ static const char *to_string(img_address a)
 }
 
 
-uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size)
+static uint64 extract_bits(uint64 data, uint32 bit_offset, uint32 bit_size)
 {
 return (data << (64 - (bit_size + bit_offset))) >> (64 - bit_size);
 }
 
 
-int64 sign_extend(int64 data, int msb)
+static int64 sign_extend(int64 data, int msb)
 {
 uint64 shift = 63 - msb;
 return (data << shift) >> shift;
@@ -463,7 +463,7 @@ static uint64 encode_shift3_from_shift(uint64 d)
 
 
 /* special value for load literal */
-int64 encode_eu_from_s_li16(uint64 d)
+static int64 encode_eu_from_s_li16(uint64 d)
 {
 IMGASSERTONCE(d < 128);
 return d == 127 ? -1 : (int64)d;
@@ -22780,7 +22780,7 @@ static struct Pool MAJOR[2] = {
 };
 
 
-int nanomips_dis(char *buf,
+static int nanomips_dis(char *buf,
  unsigned address,
  unsigned short one,
  unsigned short two,
-- 
2.25.1