public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Thomas Koenig <tkoenig@netcologne.de>
To: binutils@sourceware.org
Subject: [patch, gas documentation] Describe handling of opcodes for relaxation a bit better
Date: Sun, 16 Apr 2023 21:47:11 +0200	[thread overview]
Message-ID: <baf3b8d6-a257-7bc7-5dfa-2a8f578c2c93@netcologne.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

Hi,

here's a patch for the documentation that I wish had been in there
before I started looking at this :-) I've also left in the original
advice, although that is much more complex than what I found in
the ports mentioned in the patch.

I've tested this patch with "texi2pdf internals.texi" and
"makeinfo internals.texi" (not sure how to convince the
build script to generate the file).

OK?  And if this (or a modified version) is OK, could somebody
commit this for me?

Best regards

	Thomas

[-- Attachment #2: doc.diff --]
[-- Type: text/x-patch, Size: 1196 bytes --]

diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi
index cb568d6edfd..aecf3a08718 100644
--- a/gas/doc/internals.texi
+++ b/gas/doc/internals.texi
@@ -1824,9 +1824,11 @@ opcode field from the relaxable frag.  It is not guaranteed to be the same frag.
 If you need to emit fixups for the opcode field from inspection of the
 relaxable frag, then you need to generate a common frag for both the basic
 opcode and relaxable fields, or you need to provide the frag for the opcode to
-pass to @code{fix_new}.  The latter can be done for example by defining
-@code{TC_FRAG_TYPE} to include a pointer to it and defining @code{TC_FRAG_INIT}
-to set the pointer.
+pass to @code{fix_new}.  The latter can be done by passing a pointer to the
+opcode in the call to @code{frag_var} or @code{frag_variant}, and accessing
+it via @code{fr_opcode}.  See the @file{tc-vax.c}  and @file{tc-m68k.c} for
+examples. It is also possible for  @code{TC_FRAG_TYPE} to include a pointer to
+the opcode and defining @code{TC_FRAG_INIT} to set the pointer.
 
 Sometimes @code{fr_var} is increased instead, and @code{frag_wane} is not
 called.  I'm not sure, but I think this is to keep @code{fr_fix} referring to

             reply	other threads:[~2023-04-16 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-16 19:47 Thomas Koenig [this message]
2023-04-18 10:23 ` Nick Clifton

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=baf3b8d6-a257-7bc7-5dfa-2a8f578c2c93@netcologne.de \
    --to=tkoenig@netcologne.de \
    --cc=binutils@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).