tcg: add dup_const_tl wrapper
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>
Sun, 3 Oct 2021 21:42:42 +0000 (23:42 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 5 Oct 2021 23:53:17 +0000 (16:53 -0700)
commitdb637f270b52f8c2a1c55e7e707532532295715c
treebb77bbef6263bd475245faae8a4e02152fff7cc4
parent08a13c4b247338329951238a6c47b94f70c387d2
tcg: add dup_const_tl wrapper

dup_const always generates a uint64_t, which may exceed the size of a
target_long (generating warnings with recent-enough compilers).

To ensure that we can use dup_const both for 64bit and 32bit targets,
this adds dup_const_tl, which either maps back to dup_const (for 64bit
targets) or provides a similar implementation using 32bit constants.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Message-Id: <20211003214243.3813425-1-philipp.tomsich@vrull.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/tcg/tcg.h