ast,build: allow setting data attributes

Previously GLOBL/DATA attributes are set to RODATA. This diff removes
that default and allows them to be set through the DataAttributes
context method.

Updates #2
This commit is contained in:
Michael McLoughlin
2018-12-31 19:04:14 -08:00
parent f2315d539c
commit 816fa4c0e6
8 changed files with 19 additions and 11 deletions

View File

@@ -22,13 +22,13 @@ TEXT ·EncodeInt(SB), $0-24
RET
DATA reciprocal180<>(SB)/8, $(0.005555555555555556)
GLOBL reciprocal180<>(SB), RODATA, $8
GLOBL reciprocal180<>(SB), RODATA|NOPTR, $8
DATA onepointfive<>(SB)/8, $(1.5)
GLOBL onepointfive<>(SB), RODATA, $8
GLOBL onepointfive<>(SB), RODATA|NOPTR, $8
DATA reciprocal360<>(SB)/8, $(0.002777777777777778)
GLOBL reciprocal360<>(SB), RODATA, $8
GLOBL reciprocal360<>(SB), RODATA|NOPTR, $8
DATA mask<>(SB)/8, $0x5555555555555555
GLOBL mask<>(SB), RODATA, $8
GLOBL mask<>(SB), RODATA|NOPTR, $8