[Qemu-devel] [PATCH v3 2/8] target/mips: Workaround for checkpatch.pl hanging on msa_helper.c

Aleksandar Markovic posted 8 patches 7 years, 4 months ago
[Qemu-devel] [PATCH v3 2/8] target/mips: Workaround for checkpatch.pl hanging on msa_helper.c
Posted by Aleksandar Markovic 7 years, 4 months ago
From: Aleksandar Markovic <amarkovic@wavecomp.com>

If checkpatch.pl is applied (using switch "-f") on file
target/mips/msa_helper.c, it will hang.

This is a workaround by correcting the source file. The workaround is
found by partial deleting and undeleting of the code in msa_helper.c
in binary search fashion.

The bug (for checkpatch.pl) is already reported to the qemu-devel list.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
 target/mips/msa_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c
index c74e3cd..1691b70 100644
--- a/target/mips/msa_helper.c
+++ b/target/mips/msa_helper.c
@@ -2750,8 +2750,8 @@ void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
 
 #define FMAXMIN_A(F, G, X, _S, _T, BITS, STATUS)                    \
     do {                                                            \
-        uint## BITS ##_t S = _S, T = _T;                            \
-        uint## BITS ##_t as, at, xs, xt, xd;                        \
+        uint## BITS ## _t S = _S, T = _T;                           \
+        uint## BITS ## _t as, at, xs, xt, xd;                       \
         if (NUMBER_QNAN_PAIR(S, T, BITS, STATUS)) {                 \
             T = S;                                                  \
         }                                                           \
-- 
2.7.4


Re: [Qemu-devel] [PATCH v3 2/8] target/mips: Workaround for checkpatch.pl hanging on msa_helper.c
Posted by Philippe Mathieu-Daudé 7 years, 4 months ago
Hi Aleksandar,

On 07/04/2018 04:30 PM, Aleksandar Markovic wrote:
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
> 
> If checkpatch.pl is applied (using switch "-f") on file
> target/mips/msa_helper.c, it will hang.
> 
> This is a workaround by correcting the source file. The workaround is
> found by partial deleting and undeleting of the code in msa_helper.c
> in binary search fashion.
> 
> The bug (for checkpatch.pl) is already reported to the qemu-devel list.

Paolo already sent a fix for this bug:
http://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg01250.html

Can you test it?

> 
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
>  target/mips/msa_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c
> index c74e3cd..1691b70 100644
> --- a/target/mips/msa_helper.c
> +++ b/target/mips/msa_helper.c
> @@ -2750,8 +2750,8 @@ void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  
>  #define FMAXMIN_A(F, G, X, _S, _T, BITS, STATUS)                    \
>      do {                                                            \
> -        uint## BITS ##_t S = _S, T = _T;                            \
> -        uint## BITS ##_t as, at, xs, xt, xd;                        \
> +        uint## BITS ## _t S = _S, T = _T;                           \
> +        uint## BITS ## _t as, at, xs, xt, xd;                       \
>          if (NUMBER_QNAN_PAIR(S, T, BITS, STATUS)) {                 \
>              T = S;                                                  \
>          }                                                           \
> 

Re: [Qemu-devel]?==?utf-8?q? [PATCH v3 2/8] target/mips: Workaround for checkpatch.pl hanging on msa_helper.c
Posted by Aleksandar Markovic 7 years, 4 months ago
> Hi Aleksandar,
> 
> On 07/04/2018 04:30 PM, Aleksandar Markovic wrote:
> > From: Aleksandar Markovic <amarkovic@wavecomp.com>
> >
> > If checkpatch.pl is applied (using switch "-f") on file
> > target/mips/msa_helper.c, it will hang.
> >
> > This is a workaround by correcting the source file. The workaround is
> > found by partial deleting and undeleting of the code in msa_helper.c
> > in binary search fashion.
> >
> > The bug (for checkpatch.pl) is already reported to the qemu-devel list.
> 
> Paolo already sent a fix for this bug:
> http://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg01250.html
> 
> Can you test it?

Philippe, I tested Paolo's fix and I confirm that it fixed the original issue - there is no hang.

Regards,
Aleksandar