Hi,

The patch set Patchew intented to compile is incorrect, but this error worried me:

On 05/10/2017 05:20 PM, no-re...@patchew.org wrote:
This series failed build test on s390x host. Please find the details below.
[...]
  CC      mips64-softmmu/target/mips/translate.o
/var/tmp/patchew-tester-tmp-f7svi4g9/src/target/mips/translate.c: In function 
‘gen_bshfl’:
/var/tmp/patchew-tester-tmp-f7svi4g9/src/target/mips/translate.c:4595:43: 
error: large integer implicitly truncated to unsigned type [-Werror=overflow]
             tcg_gen_extract_tl(t1, t0, 8, 0x00FF00FF00FF00FFULL);
                                           ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/patchew-tester-tmp-f7svi4g9/src/target/mips/translate.c:4606:44: 
error: large integer implicitly truncated to unsigned type [-Werror=overflow]
             tcg_gen_extract_tl(t1, t0, 16, 0x0000FFFF0000FFFFULL);
                                            ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
/var/tmp/patchew-tester-tmp-f7svi4g9/src/rules.mak:69: recipe for target 
'target/mips/translate.o' failed
make[1]: *** [target/mips/translate.o] Error 1
Makefile:327: recipe for target 'subdir-mips64el-softmmu' failed

Now I tried to use this code on mips64el-softmmu target:

tcg_gen_extract_tl(t1, t0, 5, 0x7ffffffffffffff);

And got:

error: large integer implicitly truncated to unsigned type [-Werror=overflow]
             tcg_gen_extract_tl(t1, t0, 5, 0x7ffffffffffffff);
                                           ^~~~~~~~~~~~~~~~~

There is no need for a such operation, but it seems legit.

I think tcg-op.h would be clearer cleaning few 'unsigned/unsigned int' by a 'tcg_target_long'. Like:

 void tcg_gen_extract_i64(TCGv_i64 ret, TCGv_i64 arg,
-                         unsigned int ofs, unsigned int len);
+                         unsigned int ofs, tcg_target_long len);

What do you think Richard?

Regards,

Phil.

Reply via email to