From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C057D3858D39; Fri, 7 Jun 2024 21:51:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C057D3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1717797092; bh=CK/pW1ku6FuWV6vzfPn2SWGeJU0k76G3MGHd6EeRh/g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hg00e/xEZLky+/zN16+UuymUlus6VkdzztradSoY9IrdBdGsqhFrIhFtq6jJ7jVKw Ic/HkEIMOzmpj+qn5Eh1L8IWmqmlYV1PtZLBPphC1Q8Rw81aaKPo9FdaHIKORuGB23 cOtCxcixaFBdRPrg0hr2AdcVo13dbnKRHP2JVqjc= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/31666] Support aarch64 mops feature ops ( CPYF*, CPY*, SET* and SETG*) Date: Fri, 07 Jun 2024 21:51:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31666 --- Comment #5 from Sourceware Commits --- The gdb-15-branch branch has been updated by Thiago Bauermann : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8215789c478d= 3fc006a94d4e7c1273329aa8c773 commit 8215789c478d3fc006a94d4e7c1273329aa8c773 Author: Thiago Jung Bauermann Date: Sat Apr 27 18:38:22 2024 -0300 gdb/aarch64: Disable displaced single-step for MOPS instructions The AArch64 MOPS (Memory Operation) instructions provide a standardised instruction sequence to perform a memset, memcpy or memmove. A sequenc= e is always composed of three instructions: a prologue instruction, a main instruction and an epilogue instruction. As an illustration, here are = the implementations of these memory operations in glibc 2.39: (gdb) disassemble/r Dump of assembler code for function __memset_mops: =3D> 0x0000fffff7e8d780 <+0>: d503201f nop 0x0000fffff7e8d784 <+4>: aa0003e3 mov x3, x0 0x0000fffff7e8d788 <+8>: 19c10443 setp [x3]!, x2!, x1 0x0000fffff7e8d78c <+12>: 19c14443 setm [x3]!, x2!, x1 0x0000fffff7e8d790 <+16>: 19c18443 sete [x3]!, x2!, x1 0x0000fffff7e8d794 <+20>: d65f03c0 ret End of assembler dump. (gdb) disassemble/r Dump of assembler code for function __memcpy_mops: =3D> 0x0000fffff7e8c580 <+0>: d503201f nop 0x0000fffff7e8c584 <+4>: aa0003e3 mov x3, x0 0x0000fffff7e8c588 <+8>: 19010443 cpyfp [x3]!, [x1]!,= x2! 0x0000fffff7e8c58c <+12>: 19410443 cpyfm [x3]!, [x1]!,= x2! 0x0000fffff7e8c590 <+16>: 19810443 cpyfe [x3]!, [x1]!,= x2! 0x0000fffff7e8c594 <+20>: d65f03c0 ret End of assembler dump. (gdb) disassemble/r Dump of assembler code for function __memmove_mops: =3D> 0x0000fffff7e8d180 <+0>: d503201f nop 0x0000fffff7e8d184 <+4>: aa0003e3 mov x3, x0 0x0000fffff7e8d188 <+8>: 1d010443 cpyp [x3]!, [x1]!,= x2! 0x0000fffff7e8d18c <+12>: 1d410443 cpym [x3]!, [x1]!,= x2! 0x0000fffff7e8d190 <+16>: 1d810443 cpye [x3]!, [x1]!,= x2! 0x0000fffff7e8d194 <+20>: d65f03c0 ret End of assembler dump. The Arm Architecture Reference Manual says that "the prologue, main, and epilogue instructions are expected to be run in succession and to appear consecutively in memory". Therefore this patch disables displaced step= ping on them. The testcase verifies that MOPS sequences are correctly single-stepped. PR tdep/31666 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31666 Approved-By: Luis Machado Tested-By: Luis Machado (cherry picked from commit b995344c116e04bd6bfeaf53364cd791d0dae45d) --=20 You are receiving this mail because: You are on the CC list for the bug.=