|
From: Mark W. <ma...@so...> - 2025-10-17 13:44:01
|
https://sourceware.org/cgit/valgrind/commit/?id=41e2f95cf129191555e0048ccbbb392ee0fb155e commit 41e2f95cf129191555e0048ccbbb392ee0fb155e Author: Mark Wielaard <ma...@kl...> Date: Fri Oct 17 15:38:43 2025 +0200 Support AArch64 ARMv8.3 LDAPR/LDAPRH/LDAPRB instructions Implement them just like LDAR/LDARH/LDARB. Patch by: Arne Juul <ar...@ve...> https://bugs.kde.org/show_bug.cgi?id=476465 Diff: --- NEWS | 1 + VEX/priv/guest_arm64_toIR.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index f6608c70fe..1306652087 100644 --- a/NEWS +++ b/NEWS @@ -93,6 +93,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 369030 Wrap linux syscall: 171 (setdomainname) 388526 Inconsistent severity in message text: "WARNING: Serious error" 418756 MAP_FIXED_NOREPLACE mmap flag unsupported +476465 AArch64 ARMv8.3 LDAPR/LDAPRH/LDAPRB instructions not supported 493430 Review all syscalls that use or return (new) file descriptors 493434 Add --track-fds=bad mode (no "leak" tracking) 501741 syscall cachestat not wrapped diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c index f5b445489e..abee070815 100644 --- a/VEX/priv/guest_arm64_toIR.c +++ b/VEX/priv/guest_arm64_toIR.c @@ -7053,14 +7053,20 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, /* ------------------ LDA{R,RH,RB} ------------------ */ /* ------------------ STL{R,RH,RB} ------------------ */ + /* ------------------ LDAP{R,RH,RB} ----------------- */ /* 31 29 23 20 14 9 4 sz 001000 110 11111 1 11111 n t LDAR<sz> Rt, [Xn|SP] sz 001000 100 11111 1 11111 n t STLR<sz> Rt, [Xn|SP] + sz 111000 101 11111 1 10000 n t LDAPR<sz> Rt, [Xn|SP] */ - if (INSN(29,23) == BITS7(0,0,1,0,0,0,1) - && INSN(21,10) == BITS12(0,1,1,1,1,1,1,1,1,1,1,1)) { + if ((INSN(29,23) == BITS7(0,0,1,0,0,0,1) + && INSN(21,10) == BITS12(0,1,1,1,1,1,1,1,1,1,1,1)) + || + (INSN(29,21) == BITS9(1,1,1,0,0,0,1,0,1) + && INSN(20,10) == BITS11(1,1,1,1,1,1,1,0,0,0,0))) + { UInt szBlg2 = INSN(31,30); - Bool isLD = INSN(22,22) == 1; + Bool isLD = INSN(23,21) != BITS3(1,0,0); UInt nn = INSN(9,5); UInt tt = INSN(4,0); |