public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* This series patches result in some gas/ld test errors. There are some,files need to be regenerated.
@ 2022-12-13  8:13 mengqinggang
  0 siblings, 0 replies; only message in thread
From: mengqinggang @ 2022-12-13  8:13 UTC (permalink / raw)
  To: binutils, i.swmail; +Cc: xuchenghua, liuzhensong, Xi Ruoyao

This patch result in some gas/ld test errors. There are some
files need to be regenerated.


Add a flag in the pinfo field for being able to mark certain specialized
matchers as disassembler-only, so some degree of isolation between
assembler-side and disassembler-side can be achieved.

This isolation is necessary, firstly because some pseudo-instructions
cannot be fully described in the opcode table, like `li.[wd]`, so the
corresponding opcode entry cannot have meaningful match/mask values.
Secondly, some of these pseudo-instructions can be realized in more than
one plausible ways; e.g. `li.w rd, <something between 0 and 0x7ff>` can
be realized on LA64 with any of `addi.w`, `addi.d` or `ori`. If we tie
disassembly of such aliases with the corresponding GAS support, only one
canonical form among the above would be recognized as `li.w`, and it
would mildly impact the readability of disassembly output.
People wanting the exact disassembly can always set `-M no-aliases` to
get the original behavior back.

In addition, in certain cases, information is irreversibly lost after
assembling, so perfect round-trip would not be possible in such cases.
For example, `li.w` and `li.d` of immediates within int32_t range
produce the same code; in this patch, `addi.d rd, $zero, imm` is treated
as `li.d`, while `addi.w` and `ori` immediate loads are shown as `li.w`,
due to the expressible value range well within 32 bits.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-13  8:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13  8:13 This series patches result in some gas/ld test errors. There are some,files need to be regenerated mengqinggang

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).