]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: fix incorrect rejection of legal instructions
authorBen Shi <powerman1st@163.com>
Wed, 1 Aug 2018 06:38:54 +0000 (06:38 +0000)
committerCherry Zhang <cherryyz@google.com>
Fri, 3 Aug 2018 15:44:22 +0000 (15:44 +0000)
commit9594ba4fe58e9d790ba8dbaa452132d5c4034fd3
tree4c66ab580fa1254b5d172b4424046f09a519b68a
parentac6d1564795e662b5b930c6b3d86f12351ff83d5
cmd/internal/obj/arm64: fix incorrect rejection of legal instructions

"BFI $0, R1, $7, R2" is expected to copy bit 0~6 from R1 to R2, and
left R2's other bits unchanged.

But the assembler rejects it with error "illegal bit number", and
BFIW/SBFIZ/SBFIZW/UBFIZ/UBFIZW have the same problem.

This CL fixes that issue and adds corresponding test cases.

fixes #26736

Change-Id: Ie0090a0faa38a49dd9b096a0f435987849800b76
Reviewed-on: https://go-review.googlesource.com/127159
Run-TryBot: Ben Shi <powerman1st@163.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/internal/obj/arm64/asm7.go