• Josh Bleecher Snyder's avatar
    cmd/asm: improve DATA size operand validation · f31305b7
    Josh Bleecher Snyder authored
    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: default avatarKeith Randall <khr@golang.org>
    f31305b7
asm.go 22.3 KB