[PATCH v4 0/3] target/i386/tcg: fix EIP truncation for wrapping 16-bit near branches

Richard Henderson posted 3 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260926235620.851099-1-richard.henderson@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>
target/i386/tcg/translate.c                |  38 ++++----
tests/tcg/i386/system/meson.build          |   3 +-
tests/tcg/i386/system/test-branch-wrap16.S | 101 +++++++++++++++++++++
3 files changed, 124 insertions(+), 18 deletions(-)
create mode 100644 tests/tcg/i386/system/test-branch-wrap16.S
[PATCH v4 0/3] target/i386/tcg: fix EIP truncation for wrapping 16-bit near branches
Posted by Richard Henderson 1 month, 3 weeks ago
Hi Paul, thanks for the testcase.

While your patch did fix the bug, it retained other surrounding
buggy code that attempted to fix this but failed to do so.


r~


Paul Galbraith (1):
  tests/tcg/i386: Add regression test for wrapping 16-bit near branches

Richard Henderson (2):
  target/i386/tcg: Add DisasContext.pc_save_valid
  target/i386/tcg: fix EIP truncation for wrapping near branches

 target/i386/tcg/translate.c                |  38 ++++----
 tests/tcg/i386/system/meson.build          |   3 +-
 tests/tcg/i386/system/test-branch-wrap16.S | 101 +++++++++++++++++++++
 3 files changed, 124 insertions(+), 18 deletions(-)
 create mode 100644 tests/tcg/i386/system/test-branch-wrap16.S

-- 
2.53.0
Re: [PATCH v4 0/3] target/i386/tcg: fix EIP truncation for wrapping 16-bit near branches
Posted by Richard Henderson 1 month ago
On 9/27/26 01:56, Richard Henderson wrote:
> Hi Paul, thanks for the testcase.
> 
> While your patch did fix the bug, it retained other surrounding
> buggy code that attempted to fix this but failed to do so.
> 
> 
> r~
> 
> 
> Paul Galbraith (1):
>    tests/tcg/i386: Add regression test for wrapping 16-bit near branches
> 
> Richard Henderson (2):
>    target/i386/tcg: Add DisasContext.pc_save_valid
>    target/i386/tcg: fix EIP truncation for wrapping near branches
> 
>   target/i386/tcg/translate.c                |  38 ++++----
>   tests/tcg/i386/system/meson.build          |   3 +-
>   tests/tcg/i386/system/test-branch-wrap16.S | 101 +++++++++++++++++++++
>   3 files changed, 124 insertions(+), 18 deletions(-)
>   create mode 100644 tests/tcg/i386/system/test-branch-wrap16.S
> 

Ping.


r~