libgo patch committed: Copy hash code from Go 1.7 runtime

Sebastian Huber sebastian.huber@embedded-brains.de
Fri Dec 9 10:09:00 GMT 2016


On 08/12/16 17:37, Ian Lance Taylor wrote:
> +// For gccgo, use go:linkname to rename compiler-called functions to
> +// themselves, so that the compiler will export them.
> +//
> +//go:linkname memhash runtime.memhash
> +
> +const (
> +	// Constants for multiplication: four random odd 64-bit numbers.
> +	m1 = 16877499708836156737
> +	m2 = 2820277070424839065
> +	m3 = 9497967016996688599
> +	m4 = 15839092249703872147
> +)

Out of curiosity, how did you generate these numbers?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Gcc-patches mailing list