public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-31666-4717-a9mOPvPRNr@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31666-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31666

--- Comment #5 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The gdb-15-branch branch has been updated by Thiago Bauermann
<bauermann@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8215789c478d3fc006a94d4e7c1273329aa8c773

commit 8215789c478d3fc006a94d4e7c1273329aa8c773
Author: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
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 sequence 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:
      => 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:
      => 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:
      => 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 stepping
    on them.

    The testcase verifies that MOPS sequences are correctly single-stepped.

    PR tdep/31666
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31666
    Approved-By: Luis Machado <luis.machado@arm.com>
    Tested-By: Luis Machado <luis.machado@arm.com>

    (cherry picked from commit b995344c116e04bd6bfeaf53364cd791d0dae45d)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-06-07 21:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  4:11 [Bug tdep/31666] New: " thiago.bauermann at linaro dot org
2024-04-22  4:12 ` [Bug tdep/31666] " thiago.bauermann at linaro dot org
2024-05-04  0:09 ` thiago.bauermann at linaro dot org
2024-05-07  2:38 ` thiago.bauermann at linaro dot org
2024-06-07 21:39 ` cvs-commit at gcc dot gnu.org
2024-06-07 21:39 ` cvs-commit at gcc dot gnu.org
2024-06-07 21:51 ` cvs-commit at gcc dot gnu.org [this message]
2024-06-07 21:51 ` cvs-commit at gcc dot gnu.org
2024-06-14 15:36 ` luis.machado at arm dot com
2024-06-14 16:13 ` thiago.bauermann at linaro dot org
2024-06-14 16:14 ` thiago.bauermann at linaro dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31666-4717-a9mOPvPRNr@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).