]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: fix assemble add/adds/sub/subs/cmp/cmn(extended register...
authorfanzha02 <fannie.zhang@arm.com>
Wed, 17 Jan 2018 10:25:26 +0000 (10:25 +0000)
committerCherry Zhang <cherryyz@google.com>
Tue, 6 Feb 2018 00:25:23 +0000 (00:25 +0000)
commita0222ec518a80909060151ccbc275e67f3f03b60
tree99405621257f505c374a1744eae0aa8589faf80d
parent595231763754e5fc3a8431a31f3ae893fd7d2d57
cmd/internal/obj/arm64: fix assemble add/adds/sub/subs/cmp/cmn(extended register) bug

The current code encodes the wrong option value in the binary.

The fix reconstructs the function opxrrr() that does not encode the option
value into the binary value when arguments is sign or zero-extended register.

Add the relevant test cases and negative tests.

Fixes #23501
Change-Id: Ie5850ead2ad08d9a235a5664869aac5051762f1f
Reviewed-on: https://go-review.googlesource.com/88876
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/arch/arm64.go
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/arm64error.s
src/cmd/internal/obj/arm64/asm7.go