[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/31400] New: The third expression of .align
From: |
mengqinggang at loongson dot cn |
Subject: |
[Bug gas/31400] New: The third expression of .align |
Date: |
Mon, 19 Feb 2024 03:58:28 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31400
Bug ID: 31400
Summary: The third expression of .align
Product: binutils
Version: 2.42
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: mengqinggang at loongson dot cn
Target Milestone: ---
$ cat align.s
1 ret
2 .align 16, , 1
3 ret
4 .align 16, , -1
5 ret
6 .align 16, , -4294967295
7 ret
$ as align.s
$ objdump -d a.out
On X86:
0000000000000000 <.text>:
0: c3 ret
1: c3 ret
2: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
9: 00 00 00 00
d: 0f 1f 00 nopl (%rax)
10: c3 ret
11: c3 ret
AArch64 has similar output:
0000000000000000 <.text>:
0: d65f03c0 ret
4: d65f03c0 ret
8: d503201f nop
c: d503201f nop
10: d65f03c0 ret
14: d65f03c0 ret
If the third parameter of .align is negative, should it be ignored?
But now there are different behaviors.
For llvm: if the third parameter is negative, it will cause an error.
# llvm-mc align.s -filetype=obj
align.s:4:14: error: alignment directive can never be satisfied in this many
bytes, ignoring maximum bytes expression
.align 16, , -1
^
align.s:6:14: error: alignment directive can never be satisfied in this many
bytes, ignoring maximum bytes expression
.align 16, , -4294967295
^
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gas/31400] New: The third expression of .align,
mengqinggang at loongson dot cn <=