• Cherry Zhang's avatar
    cmd/asm: reject STREX with same source and destination register on ARM · 290de1f8
    Cherry Zhang authored
    On ARM, STREX does not permit the same register used as both the
    source and the destination. Reject the bad instruction.
    
    The assembler also accepted special cases
    	STREX R0, (R1)	as STREX R0, (R1), R0
    	STREX (R1), R0	as STREX R0, (R1), R0
    both are illegal. Remove this special case as well.
    
    For STREXD, check that the destination is not source, and not
    source+1. Also check that the source register is even numbered,
    as required by the architecture's manual.
    
    Fixes #22268.
    
    Change-Id: I6bfde86ae692d8f1d35bd0bd7aac0f8a11ce8e22
    Reviewed-on: https://go-review.googlesource.com/71190
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    290de1f8
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...