Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.half, .word, .dword directives don't imply natural alignment on gas #12

Closed
asb opened this issue May 17, 2018 · 1 comment
Closed

.half, .word, .dword directives don't imply natural alignment on gas #12

asb opened this issue May 17, 2018 · 1 comment

Comments

@asb
Copy link
Contributor

asb commented May 17, 2018

The listing in this manual indicates that .half, .word, .dword imply alignment. I'm not seeing that behaviour in the current GNU assembler (i.e. .byte followed by .word results in the .word value being unaligned).

Is this a documentation bug or an assembler bug? It looks like LLVM's MC layer doesn't interpret .word etc as implying alignment on any current target, so the current gas behaviour is trivial to support, while I'd need to do a little more implementation work if .word and friends are naturally aligned.

[Sidenote: It looks like the GNU assembler accepts .short, .hword, .long and .quad in addition to the data directives listed here.]

@aswaterman
Copy link
Contributor

Thanks for the note. This is a doc bug.

The GNU assembler accepts a whole bunch of other directives, too. I support standardizing and documenting all the sensible ones.

asb added a commit to asb/riscv-asm-manual that referenced this issue May 17, 2018
As discussed in riscv-non-isa#12, none of the data directives imply alignment. This
pull request removes that incorrect statement and adds further data
directives supported by both gas and LLVM MV.
asb added a commit to asb/riscv-asm-manual that referenced this issue May 17, 2018
As discussed in riscv-non-isa#12, none of the data directives imply alignment. This
pull request removes that incorrect statement and adds further data
directives supported by both gas and LLVM MC.
asb added a commit to asb/riscv-asm-manual that referenced this issue May 17, 2018
As discussed in riscv-non-isa#12, none of the data directives imply alignment. This
pull request removes that incorrect statement and adds further data
directives supported by both gas and LLVM MC.
asb added a commit to asb/riscv-asm-manual that referenced this issue May 17, 2018
As discussed in riscv-non-isa#12, none of the data directives imply alignment. This
pull request removes that incorrect statement and adds further data
directives supported by both gas and LLVM MC.

Closes riscv-non-isa#12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants