summary refs log tree commit diff stats
path: root/hw/hyperv/hyperv_testdev.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2020-08-03 19:54:36 +0200
committerThomas Huth <thuth@redhat.com>2020-08-05 10:43:45 +0200
commit35c7f5254b608c0694b11fc9f0d2c1a4ffb216b4 (patch)
tree7128c26c78b453bc942795ba360af2d68940bd2c /hw/hyperv/hyperv_testdev.c
parent5896c5395476ca30caad6ddd48d4b9dca2c63c00 (diff)
downloadfocaccia-qemu-35c7f5254b608c0694b11fc9f0d2c1a4ffb216b4.tar.gz
focaccia-qemu-35c7f5254b608c0694b11fc9f0d2c1a4ffb216b4.zip
target/riscv/vector_helper: Fix build on 32-bit big endian hosts
The code currently fails to compile on 32-bit big endian hosts:

 target/riscv/vector_helper.c: In function 'vext_clear':
 target/riscv/vector_helper.c:154:16: error: cast to pointer from integer
 of different size [-Werror=int-to-pointer-cast]
         memset((void *)((uintptr_t)tail & ~(7ULL)), 0, part1);
                ^
 target/riscv/vector_helper.c:155:16: error: cast to pointer from integer
 of different size [-Werror=int-to-pointer-cast]
         memset((void *)(((uintptr_t)tail + 8) & ~(7ULL)), 0, part2);
                ^
 cc1: all warnings being treated as errors

We should not use "long long" (i.e. 64-bit) values here to avoid the
problem. Switch to our QEMU_ALIGN_PTR_DOWN/UP macros instead.

Fixes: 751538d5da ("add vector stride load and store instructions")
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200804170055.2851-3-thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/hyperv/hyperv_testdev.c')
0 files changed, 0 insertions, 0 deletions