diff options
author | Laurent Vivier <laurent@vivier.eu> | 2018-07-04 20:38:55 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-07-07 12:12:27 +1000 |
commit | 4fff72185b38cc9ad3162c1794428141f20366a3 (patch) | |
tree | 68f136861a86f2bc871f359b43498b9c1574c1d6 /audio | |
parent | 7aeb1e5100c026f2f232e570cd4d56942785f462 (diff) | |
download | qemu-4fff72185b38cc9ad3162c1794428141f20366a3.zip qemu-4fff72185b38cc9ad3162c1794428141f20366a3.tar.gz qemu-4fff72185b38cc9ad3162c1794428141f20366a3.tar.bz2 |
target/ppc: fix build on ppc64 host
When I try to build a ppc64 target on a ppc64 host (gcc 8.1.1), I have:
.../target/ppc/int_helper.c: In function 'helper_vinsertb':
.../target/ppc/int_helper.c:1954:32: error: array subscript 18446744073709551608 is above array bounds of 'uint8_t[16]' {aka 'unsigned char[16]'} [-Werror=array-bounds]
memmove(&r->u8[index], &b->u8[8 - sizeof(r->element)], \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../target/ppc/int_helper.c:1965:1: note: in expansion of macro 'VINSERT'
If we compare with the macro for ppc64le, we can see
sizeof(r->element[0]) should be used instead of sizeof(r->element).
And VINSERT uses only u8, u16, u32 and u64, so the maximum value
of sizeof(r->element[0]) is 8
Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'audio')
0 files changed, 0 insertions, 0 deletions