]> Cypherpunks repositories - gostls13.git/commit
math, cmd/internal/obj/ppc64: improve floor, ceil, trunc with asm
authorLynn Boger <laboger@linux.vnet.ibm.com>
Thu, 22 Sep 2016 19:54:45 +0000 (14:54 -0500)
committerMichael Munday <munday@ca.ibm.com>
Fri, 23 Sep 2016 13:03:08 +0000 (13:03 +0000)
commit3311275ce8eef87a64b78589e0da0bf115f9be07
tree2f31f16164f7bfe9c3a4e539685b28bce516bff8
parented915ad421e61c3158ccae4bfbbcfbc796514ee2
math, cmd/internal/obj/ppc64: improve floor, ceil, trunc with asm

This adds the instructions frim, frip, and friz to the ppc64x
assembler for use in implementing the math.Floor, math.Ceil, and
math.Trunc functions to improve performance.

Fixes #17185

BenchmarkCeil-128                    21.4          6.99          -67.34%
BenchmarkFloor-128                   13.9          6.37          -54.17%
BenchmarkTrunc-128                   12.7          6.33          -50.16%

Change-Id: I96131bd4e8c9c8dbafb25bfeb544cf9d2dbb4282
Reviewed-on: https://go-review.googlesource.com/29654
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Michael Munday <munday@ca.ibm.com>
src/cmd/internal/obj/ppc64/a.out.go
src/cmd/internal/obj/ppc64/anames.go
src/cmd/internal/obj/ppc64/asm9.go
src/math/floor_ppc64x.s [new file with mode: 0644]
src/math/stubs_ppc64x.s