]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/s390x: add MULHD instruction
authorMichael Munday <munday@ca.ibm.com>
Mon, 11 Apr 2016 00:01:49 +0000 (20:01 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 11 Apr 2016 18:53:36 +0000 (18:53 +0000)
commitcd6b2b7451c6feb277d38820f41f81ce4a036af2
tree4c27f58cd9e0c84b95e4dc4edb02d86f85cec3f9
parentcabb1402568ae7d05d9d5adf56953a4792085a81
cmd/internal/obj/s390x: add MULHD instruction

Emulate 64-bit signed high multiplication ((a*b)>>64). To do this
we use the 64-bit unsigned high multiplication method and then
fix the result as shown in Hacker's Delight 2nd ed., chapter 8-3.

Required to enable some division optimizations.

Change-Id: I9194f428e09d3d029cb1afb4715cd5424b5d922e
Reviewed-on: https://go-review.googlesource.com/21774
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/asm/internal/asm/testdata/s390x.s
src/cmd/internal/obj/s390x/a.out.go
src/cmd/internal/obj/s390x/anames.go
src/cmd/internal/obj/s390x/asmz.go