From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2124) id 1CB6738555BF; Tue, 18 Apr 2023 10:22:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CB6738555BF Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Clifton To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Assembler Internal Docs: Describe handling of opcodes for relaxation a bit better. X-Act-Checkin: binutils-gdb X-Git-Author: Thomas Koenig X-Git-Refname: refs/heads/master X-Git-Oldrev: c2f60ac565f1d369fde98146a16f1d3ef79e1000 X-Git-Newrev: 01996a7a49bb278a50e72cb9a70011b8f907968e Message-Id: <20230418102223.1CB6738555BF@sourceware.org> Date: Tue, 18 Apr 2023 10:22:23 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2023 10:22:23 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D01996a7a49bb= 278a50e72cb9a70011b8f907968e commit 01996a7a49bb278a50e72cb9a70011b8f907968e Author: Thomas Koenig Date: Tue Apr 18 11:21:58 2023 +0100 Assembler Internal Docs: Describe handling of opcodes for relaxation a = bit better. Diff: --- gas/ChangeLog | 5 +++++ gas/doc/internals.texi | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index e7db2d83197..760230dc7b6 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2023-04-18 Thomas Koenig + + * doc/internals.texi (Relaxing with a table): Describe handling of + opcodes for relaxation a bit better. + 2023-04-13 Claudiu Zissulescu =20 * testsuite/gas/cfi/cfi-arc-1.s: Use baseline instructions. diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi index cb568d6edfd..56f10fd16fa 100644 --- a/gas/doc/internals.texi +++ b/gas/doc/internals.texi @@ -1824,9 +1824,11 @@ opcode field from the relaxable frag. It is not gua= ranteed 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 opcod= e 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 point= er to +the opcode and defining @code{TC_FRAG_INIT} to set the pointer. =20 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