Skip to content

Commit 1817af9

Browse files
committed
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>
2 parents b554312 + 2f926bf commit 1817af9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

disas/hppa.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,10 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
19681968

19691969
insn = bfd_getb32 (buffer);
19701970

1971+
info->fprintf_func(info->stream, " %02x %02x %02x %02x ",
1972+
(insn >> 24) & 0xff, (insn >> 16) & 0xff,
1973+
(insn >> 8) & 0xff, insn & 0xff);
1974+
19711975
for (i = 0; i < NUMOPCODES; ++i)
19721976
{
19731977
const struct pa_opcode *opcode = &pa_opcodes[i];
@@ -2826,6 +2830,6 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
28262830
return sizeof (insn);
28272831
}
28282832
}
2829-
(*info->fprintf_func) (info->stream, "#%8x", insn);
2833+
info->fprintf_func(info->stream, "<unknown>");
28302834
return sizeof (insn);
28312835
}

target/hppa/translate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,9 +3438,9 @@ static bool trans_shrp_sar(DisasContext *ctx, arg_shrp_sar *a)
34383438
TCGv_i64 n = tcg_temp_new_i64();
34393439

34403440
tcg_gen_xori_i64(n, cpu_sar, 63);
3441-
tcg_gen_shl_i64(t, src2, n);
3441+
tcg_gen_shl_i64(t, src1, n);
34423442
tcg_gen_shli_i64(t, t, 1);
3443-
tcg_gen_shr_i64(dest, src1, cpu_sar);
3443+
tcg_gen_shr_i64(dest, src2, cpu_sar);
34443444
tcg_gen_or_i64(dest, dest, t);
34453445
} else {
34463446
TCGv_i64 t = tcg_temp_new_i64();

0 commit comments

Comments
 (0)