From f6c1ca239d932db39a6f19d9bd343f4f4fddba76 Mon Sep 17 00:00:00 2001 From: Ezra Sitorus Date: Mon, 18 May 2026 13:34:38 +0100 Subject: [PATCH] gdb/aarch64: record/replay support for RPRFM, PRFM (reg), PRFUM The PRFM (register) instruction variant was unsupported. This is added along with RPRFM and PRFUM. No testcase has been added as these are hint instructions which don't modify registers/memory. The full testsuite was done on aarch64-none-linux-gnu without RPRFM. The gdb.arch and gdb.reverse tests were run on Shrinkwrap with RPRFM support. Approved-By: Luis Machado --- gdb/aarch64-tdep.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 4befaa2720d..a5e586a735c 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -5827,6 +5827,11 @@ aarch64_record_load_store (aarch64_insn_decode_record *aarch64_insn_r) else if (size_bits != 0x03) ld_flag = 0x01; + else if (size_bits == 0x3 && vector_flag == 0x0 && opc == 0x2) + { + /* PRFM (register) or RPRFM */ + return AARCH64_RECORD_SUCCESS; + } else return AARCH64_RECORD_UNKNOWN; @@ -5857,7 +5862,7 @@ aarch64_record_load_store (aarch64_insn_decode_record *aarch64_insn_r) aarch64_insn_r->reg_rec_count = 1; } } - /* Load/store register (immediate and unprivileged) instructions. */ + /* Load/store register (immediate and unprivileged) instructions and PRFUM. */ else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03 && !insn_bit21) { @@ -5876,7 +5881,11 @@ aarch64_record_load_store (aarch64_insn_decode_record *aarch64_insn_r) if (size_bits != 0x03) ld_flag = 0x01; else - return AARCH64_RECORD_UNKNOWN; + if (insn_bits10_11 == 0) + /* PRFUM instruction. */ + return AARCH64_RECORD_SUCCESS; + else + return AARCH64_RECORD_UNKNOWN; if (!ld_flag) { -- 2.47.3