aboutsummaryrefslogtreecommitdiff
path: root/gas/doc
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@netcologne.de>2023-04-18 11:21:58 +0100
committerNick Clifton <nickc@redhat.com>2023-04-18 11:21:58 +0100
commit01996a7a49bb278a50e72cb9a70011b8f907968e (patch)
tree5926e7ef5e4c7bbdab8e77f8296ace68123ecb19 /gas/doc
parentc2f60ac565f1d369fde98146a16f1d3ef79e1000 (diff)
downloadbinutils-01996a7a49bb278a50e72cb9a70011b8f907968e.zip
binutils-01996a7a49bb278a50e72cb9a70011b8f907968e.tar.gz
binutils-01996a7a49bb278a50e72cb9a70011b8f907968e.tar.bz2
Assembler Internal Docs: Describe handling of opcodes for relaxation a bit better.
Diffstat (limited to 'gas/doc')
-rw-r--r--gas/doc/internals.texi8
1 files changed, 5 insertions, 3 deletions
diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi
index cb568d6..56f10fd 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