]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/asm: disable scaled register format for arm64
authoreric fang <eric.fang@arm.com>
Thu, 4 Feb 2021 03:08:20 +0000 (03:08 +0000)
committereric fang <eric.fang@arm.com>
Thu, 4 Mar 2021 01:31:21 +0000 (01:31 +0000)
commit27dbc4551a37a48cf7c020db0aeac6f2841883dc
tree4be150e0653ecde2cca9ae8c2d0c804a3ef45b60
parent593f5bbad7727f57ce452c4aa93604e8dabbba7d
cmd/asm: disable scaled register format for arm64

Arm64 doesn't have scaled register format, such as (R1*2), (R1)(R2*3),
but currently the assembler doesn't report an error for such kind of
instruction operand format. This CL disables the scaled register
operand format for arm64 and reports an error if this kind of instruction
format is seen.
With this CL, the assembler won't print (R1)(R2) as (R1)(R2*1), so that
we can make the assembly test simpler.

Change-Id: I6d7569065597215be4c767032a63648d2ad16fed
Reviewed-on: https://go-review.googlesource.com/c/go/+/289589
Trust: eric fang <eric.fang@arm.com>
Run-TryBot: eric fang <eric.fang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: eric fang <eric.fang@arm.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/parse.go
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/arm64enc.s