1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:24:32 -06:00
go/misc/cgo
Ben Shi 69261ecad6 runtime: use hardware divider to improve performance
The hardware divider is an optional component of ARMv7. This patch
detects whether it is available in runtime and use it or not.

1. The hardware divider is detected at startup and a flag is set/clear
   according to a perticular bit of runtime.hwcap.
2. Each call of runtime.udiv will check this flag and decide if
   use the hardware division instruction.

A rough test shows the performance improves 40-50% for ARMv7. And
the compatibility of ARMv5/v6 is not broken.

fixes #19118

Change-Id: Ic586bc9659ebc169553ca2004d2bdb721df823ac
Reviewed-on: https://go-review.googlesource.com/37496
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2017-04-11 12:25:55 +00:00
..
errors cmd/compile: print columns (not just lines) in error messages 2017-03-09 23:29:49 +00:00
fortran *.bash: always use the same string equality operator 2017-03-14 21:46:31 +00:00
gmp all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
life all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nocgo
stdio all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
test cmd/cgo: support floating point #define macros 2017-04-07 21:09:44 +00:00
testasan
testcarchive misc/cgo/testcarchive: add missing header 2017-03-09 16:42:46 +00:00
testcshared runtime: use hardware divider to improve performance 2017-04-11 12:25:55 +00:00
testgodefs cmd/cgo: add -srcdir option 2016-10-30 19:14:08 +00:00
testplugin runtime: for plugins, don't add duplicate itabs 2017-01-17 22:37:19 +00:00
testsanitizers *.bash: always use the same string equality operator 2017-03-14 21:46:31 +00:00
testshared runtime: use hardware divider to improve performance 2017-04-11 12:25:55 +00:00
testsigfwd misc/cgo/testsigfwd: add missing return statement 2016-08-30 21:44:14 +00:00
testso cmd/dist: convert testso test into Go 2015-06-12 04:33:50 +00:00
testsovar misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms 2015-07-21 18:10:57 +00:00
testtls all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00