[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 892990: tcg: Remove dh_alias indirection for
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 892990: tcg: Remove dh_alias indirection for dh_typecode |
Date: |
Tue, 01 Mar 2022 08:01:12 -0800 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 8929906e212cbe606e361cbd32917dcbe5bb6dd0
https://github.com/qemu/qemu/commit/8929906e212cbe606e361cbd32917dcbe5bb6dd0
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-02-28 (Mon, 28 Feb 2022)
Changed paths:
M include/exec/helper-head.h
M target/hppa/helper.h
M target/i386/ops_sse_header.h
M target/m68k/helper.h
M target/ppc/helper.h
Log Message:
-----------
tcg: Remove dh_alias indirection for dh_typecode
The dh_alias redirect is intended to handle TCG types as distinguished
from C types. TCG does not distinguish signed int from unsigned int,
because they are the same size. However, we need to retain this
distinction for dh_typecode, lest we fail to extend abi types properly
for the host call parameters.
This bug was detected when running the 'arm' emulator on an s390
system. The s390 uses TCG_TARGET_EXTEND_ARGS which triggers code
in tcg_gen_callN to extend 32 bit values to 64 bits; the incorrect
sign data in the typemask for each argument caused the values to be
extended as unsigned values.
This simple program exhibits the problem:
static volatile int num = -9;
static volatile int den = -5;
int main(void)
{
int quo = num / den;
printf("num %d den %d quo %d\n", num, den, quo);
exit(0);
}
When run on the broken qemu, this results in:
num -9 den -5 quo 0
The correct result is:
num -9 den -5 quo 1
Fixes: 7319d83a735 ("tcg: Combine dh_is_64bit and dh_is_signed to dh_typecode")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/876
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 5b7b197c87cefbd24bd1936614fd4e00ccc279ab
https://github.com/qemu/qemu/commit/5b7b197c87cefbd24bd1936614fd4e00ccc279ab
Author: Luc Michel <lmichel@kalray.eu>
Date: 2022-02-28 (Mon, 28 Feb 2022)
Changed paths:
M accel/tcg/cpu-exec.c
Log Message:
-----------
accel/tcg/cpu-exec: Fix precise single-stepping after interrupt
In some cases, cpu->exit_request can be false after handling the
interrupt, leading to another TB being executed instead of returning
to the main loop.
Fix this by returning true unconditionally when in single-step mode.
Fixes: ba3c35d9c402 ("tcg/cpu-exec: precise single-stepping after an interrupt")
Signed-off-by: Luc Michel <lmichel@kalray.eu>
Message-Id: <20220214132656.11397-1-lmichel@kalray.eu>
[rth: Unlock iothread mutex; simplify indentation]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 2ccf40f00e3f29d85d4ff48a9a98870059002290
https://github.com/qemu/qemu/commit/2ccf40f00e3f29d85d4ff48a9a98870059002290
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-02-28 (Mon, 28 Feb 2022)
Changed paths:
M tcg/tci/tcg-target.c.inc
Log Message:
-----------
tcg/tci: Use tcg_out_ldst in tcg_out_st
The tcg_out_ldst helper will handle out-of-range offsets.
We haven't actually encountered any, since we haven't run
across the assert within tcg_out_op_rrs, but an out-of-range
offset would not be impossible in future.
Fixes: 65089889183 ("tcg/tci: Change encoding to uint32_t units")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 09591fcf6eb3157ab9c50a9fbbef5f8a567fb49f
https://github.com/qemu/qemu/commit/09591fcf6eb3157ab9c50a9fbbef5f8a567fb49f
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2022-03-01 (Tue, 01 Mar 2022)
Changed paths:
M accel/tcg/cpu-exec.c
M include/exec/helper-head.h
M target/hppa/helper.h
M target/i386/ops_sse_header.h
M target/m68k/helper.h
M target/ppc/helper.h
M tcg/tci/tcg-target.c.inc
Log Message:
-----------
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20220228' into
staging
Fix typecode generation for tcg helpers
Fix single stepping into interrupt handlers
Fix out-of-range offsets for stores in TCI
# gpg: Signature made Mon 28 Feb 2022 18:07:13 GMT
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
[full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* remotes/rth-gitlab/tags/pull-tcg-20220228:
tcg/tci: Use tcg_out_ldst in tcg_out_st
accel/tcg/cpu-exec: Fix precise single-stepping after interrupt
tcg: Remove dh_alias indirection for dh_typecode
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/99c53410bc9d...09591fcf6eb3
- [Qemu-commits] [qemu/qemu] 892990: tcg: Remove dh_alias indirection for dh_typecode,
Peter Maydell <=