]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm: support new arm instructions
authorBen Shi <powerman1st@163.com>
Tue, 8 Aug 2017 08:14:24 +0000 (08:14 +0000)
committerCherry Zhang <cherryyz@google.com>
Fri, 18 Aug 2017 14:13:41 +0000 (14:13 +0000)
commit75cb22cb2f316d320e88293470c7c1bd8e0243a8
tree0a1e03f9bebdf0209a48eccff56f9f94875358d2
parent310be7be5c41e70f1c2306f23c108aff2b0ed78b
cmd/internal/obj/arm: support new arm instructions

There are two changes in this CL.

1. Add new forms of MOVH/MOVHS/MOVHU.
   MOVHS R0<<0(R1), R2   // ldrsh
   MOVH  R0<<0(R1), R2   // ldrsh
   MOVHU R0<<0(R1), R2   // ldrh
   MOVHS R2, R5<<0(R1)   // strh
   MOVH  R2, R5<<0(R1)   // strh
   MOVHU R2, R5<<0(R1)   // strh

2. Simpify "MVN $0xffffffaa, Rn" to "MOVW $0x55, Rn".
   It is originally assembled to two instructions.
   "MOVW offset(PC), R11"
   "MVN R11, Rn"

Change-Id: I8e863dcfb2bd8f21a04c5d627fa7beec0afe65fb
Reviewed-on: https://go-review.googlesource.com/53690
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/arm.s
src/cmd/internal/obj/arm/asm5.go