]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: improve DATA size operand validation
authorJosh Bleecher Snyder <josharian@gmail.com>
Sat, 16 Feb 2019 00:28:05 +0000 (16:28 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 27 Feb 2019 05:52:20 +0000 (05:52 +0000)
commitf31305b71bcbfe85b918466aa6dd18e19a4b94a1
treebb6012adc54e83bd294a0c422fc54f4d359f824d
parent4a91d5501754f36dd09c23d99bbfa0bba37fe6f6
cmd/asm: improve DATA size operand validation

Prior to this change, DATA instructions accepted
the values 1, 2, 4, and 8 as sizes.
The acceptable sizes were further restricted
to 4 and 8 for float constants.

This was both too restrictive and not restrictive enough:
string constants may reasonably have any length,
and address constants should really only accept pointer-length sizes.

Fixes #30269

Change-Id: I06e44ecdf5909eca7b19553861aec1fa39655c2b
Reviewed-on: https://go-review.googlesource.com/c/163747
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/pseudo_test.go