HPPA64-PATCHES-for-8.2

Two patches for 8.2.
 
 The SHRPD patch fixes a real translation bug which then allows to boot
 the 64-bit Linux kernels of the Debian-11 and Debian-12 installation CDs.
 
 The second patch adds the instruction byte sequence to the
 assembly log. This is not an actual bug fix, but it's important since
 it helps a lot when trying to fix qemu translation bugs on hppa.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZVfHPwAKCRD3ErUQojoP
 X3TrAQD2SfFsTWIYqTamh1ZHmydaJRL1xhXmPMqXgXFkDmiyhQD/VeyIyWEGj5Oe
 x70WR8HrtkadsUddgSGzFRChaVb0/wI=
 =Sapq
 -----END PGP SIGNATURE-----

Merge tag 'hppa64-fixes-pull-request' of https://github.com/hdeller/qemu-hppa into staging

HPPA64-PATCHES-for-8.2

Two patches for 8.2.

The SHRPD patch fixes a real translation bug which then allows to boot
the 64-bit Linux kernels of the Debian-11 and Debian-12 installation CDs.

The second patch adds the instruction byte sequence to the
assembly log. This is not an actual bug fix, but it's important since
it helps a lot when trying to fix qemu translation bugs on hppa.

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZVfHPwAKCRD3ErUQojoP
# X3TrAQD2SfFsTWIYqTamh1ZHmydaJRL1xhXmPMqXgXFkDmiyhQD/VeyIyWEGj5Oe
# x70WR8HrtkadsUddgSGzFRChaVb0/wI=
# =Sapq
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 17 Nov 2023 15:04:15 EST
# gpg:                using EDDSA key BCE9123E1AD29F07C049BBDEF712B510A23A0F5F
# gpg: Good signature from "Helge Deller <deller@gmx.de>" [unknown]
# gpg:                 aka "Helge Deller <deller@kernel.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 4544 8228 2CD9 10DB EF3D  25F8 3E5F 3D04 A7A2 4603
#      Subkey fingerprint: BCE9 123E 1AD2 9F07 C049  BBDE F712 B510 A23A 0F5F

* tag 'hppa64-fixes-pull-request' of https://github.com/hdeller/qemu-hppa:
  disas/hppa: Show hexcode of instruction along with disassembly
  target/hppa: Fix 64-bit SHRPD instruction

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2023-11-20 05:24:08 -05:00
commit 1817af991c
2 changed files with 7 additions and 3 deletions

View File

@ -1968,6 +1968,10 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
insn = bfd_getb32 (buffer); insn = bfd_getb32 (buffer);
info->fprintf_func(info->stream, " %02x %02x %02x %02x ",
(insn >> 24) & 0xff, (insn >> 16) & 0xff,
(insn >> 8) & 0xff, insn & 0xff);
for (i = 0; i < NUMOPCODES; ++i) for (i = 0; i < NUMOPCODES; ++i)
{ {
const struct pa_opcode *opcode = &pa_opcodes[i]; const struct pa_opcode *opcode = &pa_opcodes[i];
@ -2826,6 +2830,6 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
return sizeof (insn); return sizeof (insn);
} }
} }
(*info->fprintf_func) (info->stream, "#%8x", insn); info->fprintf_func(info->stream, "<unknown>");
return sizeof (insn); return sizeof (insn);
} }

View File

@ -3438,9 +3438,9 @@ static bool trans_shrp_sar(DisasContext *ctx, arg_shrp_sar *a)
TCGv_i64 n = tcg_temp_new_i64(); TCGv_i64 n = tcg_temp_new_i64();
tcg_gen_xori_i64(n, cpu_sar, 63); tcg_gen_xori_i64(n, cpu_sar, 63);
tcg_gen_shl_i64(t, src2, n); tcg_gen_shl_i64(t, src1, n);
tcg_gen_shli_i64(t, t, 1); tcg_gen_shli_i64(t, t, 1);
tcg_gen_shr_i64(dest, src1, cpu_sar); tcg_gen_shr_i64(dest, src2, cpu_sar);
tcg_gen_or_i64(dest, dest, t); tcg_gen_or_i64(dest, dest, t);
} else { } else {
TCGv_i64 t = tcg_temp_new_i64(); TCGv_i64 t = tcg_temp_new_i64();