aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-12-31 19:54:58 +0000
committerHans-Peter Nilsson <hp@axis.com>2000-12-31 19:54:58 +0000
commit67db5ab439b50465821b98f47679ea9cc184e774 (patch)
tree1a38797c3422faf454231a1ce14db29d7e705502 /gas
parentc0d8940f87f55d81d2a68b9333e494b48c1a49d3 (diff)
downloadgdb-67db5ab439b50465821b98f47679ea9cc184e774.zip
gdb-67db5ab439b50465821b98f47679ea9cc184e774.tar.gz
gdb-67db5ab439b50465821b98f47679ea9cc184e774.tar.bz2
* doc/internals.texi (Relaxing with a table) <after relaxation>:
Point out caveats with generating fixups for the opcode in a frag.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/doc/internals.texi10
2 files changed, 15 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ba31aa6..7432c9f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-31 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * doc/internals.texi (Relaxing with a table) <after relaxation>:
+ Point out caveats with generating fixups for the opcode in a frag.
+
Sat Dec 30 19:02:48 MET 2000 Jan Hubicka <jh@suse.cz>
* configure.in: Add support for x86_64 and x86_64-*-linux-gnu*
diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi
index fa99bc6..a42bc0f 100644
--- a/gas/doc/internals.texi
+++ b/gas/doc/internals.texi
@@ -1601,6 +1601,16 @@ called to convert the frag to an @code{rs_fill} frag with no variant part.
Sometimes changing addressing modes may also require rewriting the instruction.
It can be accessed via @code{fr_opcode} or @code{fr_fix}.
+If you generate frags separately for the basic insn opcode and any relaxable
+operands, do not call @code{fix_new} thinking you can emit fixups for the
+opcode field from the relaxable frag. It is not garanteed 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.
+
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
an earlier byte, and @code{fr_subtype} set to @code{rs_machine_dependent} so