This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCH v2 RESEND] Document .Nbyte assembler directives
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Tobin C. Harding'" <me at tobin dot cc>, "'Alan Modra'" <amodra at gmail dot com>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 6 Mar 2017 22:04:20 +0100
- Subject: RE: [PATCH v2 RESEND] Document .Nbyte assembler directives
- Authentication-results: sourceware.org; auth=none
- References: <1488779886-26753-1-git-send-email-me@tobin.cc>
Hi all,
I am just curious about what I read in your documentation improvement.
You state that, for .8byte
there is a warning if the bignum doesn't fit into an 8 byte integer,
but there is nothing similar for .2byte and .4byte.
Should I understand that there is no check and no warning for the two
later?
Another question I had was about alignment:
is there any alignment done?
Our could a .8byte end up unaligned?
Just curious,
Pierre Muller
Member of the core developer team of Free Pascal
and Pascal language support maintainer for GDB.
> -----Message d'origine-----
> De : binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] De la part de Tobin C. Harding
> Envoyé : lundi 6 mars 2017 06:58
> À : Alan Modra
> Cc : binutils@sourceware.org; Tobin C . Harding
> Objet : [PATCH v2 RESEND] Document .Nbyte assembler directives
>
> GAS contains directives .2byte .4byte and .8byte. These directives are
> used in the test suite but are undocumented.
>
> Add documentation to GAS section 'Assembler Directives' for each of
> directive.
>
> ---
>
> docs built using
> $ make html
>
> Changes since v1:
> - Add menu item
> - Add ifset ELF
> - Verified .8byte truncation warning
>
> gas/doc/as.texinfo | 44 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
> index 8c7fdfd..9030b06 100644
> --- a/gas/doc/as.texinfo
> +++ b/gas/doc/as.texinfo
> @@ -4555,6 +4555,11 @@ Some machine configurations provide additional
> directives.
> @ifclear no-space-dir
> * Zero:: @code{.zero @var{size}}
> @end ifclear
> +@ifset ELF
> +* 2byte:: @code{.2byte @var{expressions}}
> +* 4byte:: @code{.4byte @var{expressions}}
> +* 8byte:: @code{.8byte @var{bignums}}
> +@end ifset
> * Deprecated:: Deprecated Directives
> @end menu
>
> @@ -7333,6 +7338,45 @@ so in can take an optional second argument of
> the value to store in the bytes
> instead of zero. Using @samp{.zero} in this way would be confusing
> however.
> @end ifclear
>
> +@cindex @code{local} directive
> +This directive, which is available for ELF targets, marks each symbol
> in
> +the comma-separated list of @code{names} as a local symbol so that it
> +will not be externally visible. If the symbols do not already exist,
> +they will be created.
> +
> +@ifset ELF
> +@node 2byte
> +@section @code{.2byte @var{expressions}}
> +
> +@cindex @code{2byte} directive
> +@cindex two-byte integer
> +@cindex integer, 2-byte
> +This directive @code{.2byte}, which is available for ELF targets,
> expects zero
> +or more expressions, separated by commas. Each expression is assembled
> into the
> +next two bytes.
> +
> +@node 4byte
> +@section @code{.4byte @var{expressions}}
> +
> +@cindex @code{4byte} directive
> +@cindex four-byte integer
> +@cindex integer, 4-byte
> +This directive @code{.4byte}, which is available for ELF targets,
> expects zero
> +or more expressions, separated by commas. Each expression is assembled
> into the
> +next four bytes.
> +
> +@node 8byte
> +@section @code{.8byte @var{bignums}}
> +
> +@cindex @code{8byte} directive
> +This directive @code{.8byte}, which is available for ELF targets,
> expects zero
> +or more bignums, separated by commas. For each bignum, it emits
> +an 8-byte integer. If the bignum won't fit in 8 bytes, it prints a
> +warning message; and just takes the lowest order 8 bytes of the
> bignum.
> +@cindex eight-byte integer
> +@cindex integer, 8-byte
> +@end ifset
> +
> @node Deprecated
> @section Deprecated Directives
>
> --
> 2.7.4