]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm: fix MOVW to/from FPSR
authorBen Shi <powerman1st@163.com>
Mon, 12 Jun 2017 03:42:55 +0000 (03:42 +0000)
committerCherry Zhang <cherryyz@google.com>
Tue, 13 Jun 2017 14:06:58 +0000 (14:06 +0000)
commita38c8dfa44f32eb464b826c7f7a50e51f73506e0
tree6da42cbcd28c1ff3ef8b7098137a8246c6613fac
parent7a8f1e2bc787542fe6b9e87ebec9b682a0ff9973
cmd/internal/obj/arm: fix MOVW to/from FPSR

"MOVW FPSR, g" should be assembled to 0xeef1aa10, but actually
0xee30a110 (RFS). "MOVW g, FPSR" should be 0xeee1aa10, but actually
0xee20a110 (WFS). They should be updated to VFP forms, since the ARM
back end doesn't support non-VFP floating points.

The patch fixes them and adds more assembly encoding tests.

fixes #20643

Change-Id: I3b29490337c6e8d891b400fcedc8b0a87b82b527
Reviewed-on: https://go-review.googlesource.com/45276
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/asm/internal/asm/testdata/armerror.s
src/cmd/asm/internal/asm/testdata/armv6.s
src/cmd/internal/obj/arm/asm5.go