]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm: fix encoding of move register/immediate to CPSR
authorBen Shi <powerman1st@163.com>
Fri, 9 Jun 2017 10:24:42 +0000 (10:24 +0000)
committerCherry Zhang <cherryyz@google.com>
Fri, 9 Jun 2017 14:14:30 +0000 (14:14 +0000)
commitd3d548913570f7b7c1ae2672624607d5831032b1
treead0606e532ed4f83d3dc86f0c2b309715f90109a
parent11c61eb6afaf72c4919cc7806f1016c8bcdf311a
cmd/internal/obj/arm: fix encoding of move register/immediate to CPSR

"MOVW R1, CPSR" is assembled to 0xe129f001, which should be 0xe12cf001.
"MOVW $255, CPSR" is assembled to 0xe329f0ff, which should be 0xe32cf0ff.

This patch fixes them and adds more assembly encoding tests.

fix #20626

Change-Id: Iefc945879ea774edf40438ce39f52c144e1501a1
Reviewed-on: https://go-review.googlesource.com/45170
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/arm.s
src/cmd/internal/obj/arm/asm5.go