aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm
diff options
context:
space:
mode:
authorBen Shi <powerman1st@163.com>2017-09-09 14:17:05 +0000
committerCherry Zhang <cherryyz@google.com>2017-09-11 13:10:50 +0000
commitf727fa793968623c0dc803a7542c266892c015a4 (patch)
tree7d95a3758bfeb870de123943a48603fc9052eb81 /src/cmd/asm
parent2899c3e8cbfb5455c848b00948867a46f49030e6 (diff)
downloadgo-f727fa793968623c0dc803a7542c266892c015a4.tar.xz
cmd/internal/obj/arm: support more ARM VFP instructions
Add support of more ARM VFP instructions in the assembler. They were introduced in ARM VFPv4. "FMULAF/FMULAD Fm, Fn, Fd": Fd = Fd + Fn*Fm "FNMULAF/FNMULAD Fm, Fn, Fd": Fd = -(Fd + Fn*Fm) "FMULSF/FMULSD Fm, Fn, Fd": Fd = Fd - Fn*Fm "FNMULSF/FNMULSD Fm, Fn, Fd": Fd = -(Fd - Fn*Fm) The multiplication results are not rounded. Change-Id: Id9cc52fd8e1b9a708103cd1e514c85a9e1cb3f47 Reviewed-on: https://go-review.googlesource.com/62550 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r--src/cmd/asm/internal/asm/testdata/armerror.s8
-rw-r--r--src/cmd/asm/internal/asm/testdata/armv6.s8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/armerror.s b/src/cmd/asm/internal/asm/testdata/armerror.s
index 70e6e3471d..b41b57ca1d 100644
--- a/src/cmd/asm/internal/asm/testdata/armerror.s
+++ b/src/cmd/asm/internal/asm/testdata/armerror.s
@@ -43,6 +43,14 @@ TEXT errors(SB),$0
NMULAF F0, F1 // ERROR "illegal combination"
NMULSD F0, F1 // ERROR "illegal combination"
NMULSF F0, F1 // ERROR "illegal combination"
+ FMULAD F0, F1 // ERROR "illegal combination"
+ FMULAF F0, F1 // ERROR "illegal combination"
+ FMULSD F0, F1 // ERROR "illegal combination"
+ FMULSF F0, F1 // ERROR "illegal combination"
+ FNMULAD F0, F1 // ERROR "illegal combination"
+ FNMULAF F0, F1 // ERROR "illegal combination"
+ FNMULSD F0, F1 // ERROR "illegal combination"
+ FNMULSF F0, F1 // ERROR "illegal combination"
NEGF F0, F1, F2 // ERROR "illegal combination"
NEGD F0, F1, F2 // ERROR "illegal combination"
ABSF F0, F1, F2 // ERROR "illegal combination"
diff --git a/src/cmd/asm/internal/asm/testdata/armv6.s b/src/cmd/asm/internal/asm/testdata/armv6.s
index d00c4f08ac..c6649bc1fb 100644
--- a/src/cmd/asm/internal/asm/testdata/armv6.s
+++ b/src/cmd/asm/internal/asm/testdata/armv6.s
@@ -30,6 +30,14 @@ TEXT foo(SB), DUPOK|NOSPLIT, $0
NMULAD F5, F6, F7 // 057b16ee
NMULSF F5, F6, F7 // 457a16ee
NMULSD F5, F6, F7 // 457b16ee
+ FMULAF F5, F6, F7 // 057aa6ee
+ FMULAD F5, F6, F7 // 057ba6ee
+ FMULSF F5, F6, F7 // 457aa6ee
+ FMULSD F5, F6, F7 // 457ba6ee
+ FNMULAF F5, F6, F7 // 457a96ee
+ FNMULAD F5, F6, F7 // 457b96ee
+ FNMULSF F5, F6, F7 // 057a96ee
+ FNMULSD F5, F6, F7 // 057b96ee
DIVF F0, F1, F2 // 002a81ee
DIVD.EQ F3, F4, F5 // 035b840e
DIVF.NE F0, F2 // 002a821e