[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/8] optimize various tcg_gen() functions using
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH 0/8] optimize various tcg_gen() functions using extract op |
Date: |
Thu, 11 May 2017 23:34:54 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Hi,
The patch set Patchew intented to compile is incorrect, but this error
worried me:
On 05/10/2017 05:20 PM, address@hidden 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.
- [Qemu-devel] [PATCH 6/8] target/mips: optimize bshfl() using extract op, (continued)