Bug 18353 - Pseudo-op .zero not documented
Summary: Pseudo-op .zero not documented
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.25
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-29 03:50 UTC by Zach
Modified: 2015-04-30 09:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Describe the .zero pseudo-op (555 bytes, patch)
2015-04-29 10:45 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zach 2015-04-29 03:50:01 UTC
I was compiling code for fun (well, it was to test my Sublime Text syntax highlighter out), and I noticed the .zero directive in my .s file, which I missed.

Upon further investigation, I found that, indeed, the manual site "https://sourceware.org/binutils/docs/as/index.html" does not make any mention of it. I guess this sets the specified number of bytes to zero?
Comment 1 Nick Clifton 2015-04-29 10:45:54 UTC
Created attachment 8288 [details]
Describe the .zero pseudo-op
Comment 2 Nick Clifton 2015-04-29 10:47:03 UTC
Hi,

> Upon further investigation, I found that, indeed, the manual site
> "https://sourceware.org/binutils/docs/as/index.html" does not make any
> mention of it. I guess this sets the specified number of bytes to zero?

Exactly right.  What do you think of this description:

  7.104 '.zero SIZE'
  ==================

  This directive emits SIZE 0-valued bytes.  SIZE must be an absolute
  expression.  This directive is actually an alias for the '.skip'
  directive so in can take an optional second argument of the value to
  store in the bytes instead of zero.  Using '.zero' in this way would be
  confusing however.

Cheers
  Nick
Comment 3 Zach 2015-04-29 16:22:33 UTC
(In reply to Nick Clifton from comment #2)
> Hi,
> 
> > Upon further investigation, I found that, indeed, the manual site
> > "https://sourceware.org/binutils/docs/as/index.html" does not make any
> > mention of it. I guess this sets the specified number of bytes to zero?
> 
> Exactly right.  What do you think of this description:
> 
>   7.104 '.zero SIZE'
>   ==================
> 
>   This directive emits SIZE 0-valued bytes.  SIZE must be an absolute
>   expression.  This directive is actually an alias for the '.skip'
>   directive so in can take an optional second argument of the value to
>   store in the bytes instead of zero.  Using '.zero' in this way would be
>   confusing however.
> 
> Cheers
>   Nick

I think it looks good.
Comment 4 Sourceware Commits 2015-04-30 09:15:14 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7ce98c164ed42df085c1b3e08c5261e02320149b

commit 7ce98c164ed42df085c1b3e08c5261e02320149b
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Apr 30 10:13:53 2015 +0100

    Adds documentation of GAS's .zero directive.
    
    	PR gas/18353
    	* doc/as.texinfo (Zero): Add documentation of the .zero pseudo-op.
Comment 5 Nick Clifton 2015-04-30 09:15:43 UTC
Patch committed.