Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eliot Miranda <eliot.miranda@gmail.com>
To: bug-gdb@gnu.org
Subject: aarch64 nop instruction
Date: Wed, 20 Nov 2019 21:31:00 -0000	[thread overview]
Message-ID: <CAC20JE2mFz5zVD9y9Gzcm6V_Kp3o4C-CMtmJCF2myryW50qf+Q@mail.gmail.com> (raw)

Hi All,

    I use gdb for processor simulation in a Smalltalk JIT.  I am using gdb
8.3.1 to derive an aarch64 (ARMV8) simulator.  I have noticed that 8.3.1
does not disassemble Arm's "approved" not instruction.

The approved nop is 2r1101010100000011001000000001111, 0x6a81900f, see
C6.2.202 on p 252 of
https://developer.arm.com/docs/ddi0487/ea/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile.
When I use the 8.3.1 derived system to disassemble that nop I get e.g.
00000000: .inst 0x6a81900f ; undefined


The entry in opcodes/aarch64-tbl.h for the nop that does disassemble is

CORE_INSN ("nop", 0xd503201f, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS)

I've tried adding
CORE_INSN ("nop", 0x6a81900f, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS)
which leaves 0xd503201f unaffected but still yields "undefined" for the
:"approved" nop.

I've tried adding
  CORE_INSN ("nop", 0x6a81900f, 0xffffffff, log_shift, 0, OP0 (), {},
F_HAS_ALIAS),
with the 0ther 0x6a opcodes, e.g.
  CORE_INSN ("bics", 0x6a200000, 0x7f200000, log_shift, 0, OP3 (Rd, Rn,
Rm_SFT), QL_I3SAMER, F_SF),
and this breaks the other nop, 0xd503201f, and both forms print as
undefined.

While I think that not disassembling the official nop is a bug I'm really
more interested in finding out what the minimal change to the table is to
get the "approved" nop to disassemble.  Can anyone help?
_,,,^..^,,,_
best, Eliot


             reply	other threads:[~2019-11-20 21:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 21:31 Eliot Miranda [this message]
2019-11-20 22:09 ` Andrew Pinski
2019-11-20 22:17   ` Andrew Pinski
     [not found] ` <CA+=Sn1kA-iVtcgOQA8TaQtSxODsHDhKFn-nmk8de3m-JuSpiag@mail.gmail.com>
2019-11-20 22:50   ` Eliot Miranda

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=CAC20JE2mFz5zVD9y9Gzcm6V_Kp3o4C-CMtmJCF2myryW50qf+Q@mail.gmail.com \
    --to=eliot.miranda@gmail.com \
    --cc=bug-gdb@gnu.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