• 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
..
bio Loading commit data...
browser Loading commit data...
buildid Loading commit data...
dwarf Loading commit data...
gcprog Loading commit data...
goobj Loading commit data...
obj Loading commit data...
objabi Loading commit data...
objfile Loading commit data...
src Loading commit data...
sys Loading commit data...