aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-02-24 12:46:59 +0000
committerPeter Maydell <peter.maydell@linaro.org>2023-02-24 12:46:59 +0000
commit3f21065f0983d37c5d4a11a3c59bab5201a9f499 (patch)
treef2ed25e01bf87f2a65119c90a056265c066f253d /target
parented9128c177227bb8682deafd3530d49b059e03c4 (diff)
parent49be78ca02a687ea00ad7534254217b479a4e92d (diff)
downloadqemu-3f21065f0983d37c5d4a11a3c59bab5201a9f499.zip
qemu-3f21065f0983d37c5d4a11a3c59bab5201a9f499.tar.gz
qemu-3f21065f0983d37c5d4a11a3c59bab5201a9f499.tar.bz2
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* x86 bugfixes * OpenBSD support for naming threads * Refined Python support policy # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmP0wtkUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroNI6QgAjMvEV0N5FZYMpiuQdjebBeV+uHM6 # LThewCQa0cW5jb1X1NFBbOxYlNfE3WQeZqQF+BiVJr5wT2UsyNsPH7wTjsP387vV # juoD7D/XZo8P4Qi+vJWo8XVBrzWEK8QS1P+NxWr+ZnsAhDx2+MR87fVmHtVBW1pI # oDO0iyRrvVtaTAIVyNWSgZ59SLMmcH/6L4aYv5nrKYuAWx7fTneGGheKuqk55RsV # sMv+fHolmmwKVm8tMFksw0atPwL7ZmSm1uObNHCQKdDNSoakC7YpaXa3y8LEzU7I # B4h/PsmRpN33ggvsiuzFp9kfEHMy4QazfpoVFFqTLalhTr+XuiNTxj8xdA== # =6eNN # -----END PGP SIGNATURE----- # gpg: Signature made Tue 21 Feb 2023 13:10:49 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: target/i386/gdbstub: Fix a bug about order of FPU stack in 'g' packets. docs: build-platforms: refine requirements on Python build dependencies thread-posix: add support for setting threads name on OpenBSD target/i386: Fix 32-bit AD[CO]X insns in 64-bit mode Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/i386/gdbstub.c4
-rw-r--r--target/i386/tcg/emit.c.inc2
2 files changed, 5 insertions, 1 deletions
diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c
index c3a2cf6..7869712 100644
--- a/target/i386/gdbstub.c
+++ b/target/i386/gdbstub.c
@@ -121,7 +121,9 @@ int x86_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
return gdb_get_reg32(mem_buf, env->regs[gpr_map32[n]]);
}
} else if (n >= IDX_FP_REGS && n < IDX_FP_REGS + 8) {
- floatx80 *fp = (floatx80 *) &env->fpregs[n - IDX_FP_REGS];
+ int st_index = n - IDX_FP_REGS;
+ int r_index = (st_index + env->fpstt) % 8;
+ floatx80 *fp = &env->fpregs[r_index].d;
int len = gdb_get_reg64(mem_buf, cpu_to_le64(fp->low));
len += gdb_get_reg16(mem_buf, cpu_to_le16(fp->high));
return len;
diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc
index 0d7c6e8..e61ae9a 100644
--- a/target/i386/tcg/emit.c.inc
+++ b/target/i386/tcg/emit.c.inc
@@ -1037,6 +1037,8 @@ static void gen_ADCOX(DisasContext *s, CPUX86State *env, MemOp ot, int cc_op)
#ifdef TARGET_X86_64
case MO_32:
/* If TL is 64-bit just do everything in 64-bit arithmetic. */
+ tcg_gen_ext32u_tl(s->T0, s->T0);
+ tcg_gen_ext32u_tl(s->T1, s->T1);
tcg_gen_add_i64(s->T0, s->T0, s->T1);
tcg_gen_add_i64(s->T0, s->T0, carry_in);
tcg_gen_shri_i64(carry_out, s->T0, 32);