From 6779fad1d0d8720564def24b071a3963dbec64db Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 7 Nov 2012 22:50:39 -0800 Subject: [PATCH] go.crypto: add and adjust +build lines for 386 and gccgo R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6827061 --- curve25519/const_amd64.s | 2 ++ curve25519/cswap_amd64.s | 2 ++ curve25519/curve25519.go | 4 ++-- curve25519/freeze_amd64.s | 2 ++ curve25519/ladderstep_amd64.s | 2 ++ curve25519/mont25519_amd64.go | 2 ++ curve25519/mul_amd64.s | 2 ++ curve25519/square_amd64.s | 2 ++ poly1305/const_amd64.s | 2 ++ poly1305/poly1305_amd64.s | 2 ++ poly1305/sum_amd64.go | 2 ++ poly1305/sum_ref.go | 2 +- salsa20/salsa/salsa2020_amd64.s | 2 +- salsa20/salsa/salsa20_amd64.go | 2 +- salsa20/salsa/salsa20_ref.go | 2 +- 15 files changed, 26 insertions(+), 6 deletions(-) diff --git a/curve25519/const_amd64.s b/curve25519/const_amd64.s index 4943fd4..cc42087 100644 --- a/curve25519/const_amd64.s +++ b/curve25519/const_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + DATA ·REDMASK51(SB)/8, $0x0007FFFFFFFFFFFF GLOBL ·REDMASK51(SB), $8 diff --git a/curve25519/cswap_amd64.s b/curve25519/cswap_amd64.s index 97c84b5..16204ed 100644 --- a/curve25519/cswap_amd64.s +++ b/curve25519/cswap_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + // func cswap(inout *[5]uint64, v uint64) TEXT ·cswap(SB),7,$0 MOVQ inout+0(FP),DI diff --git a/curve25519/curve25519.go b/curve25519/curve25519.go index 95cae74..f1c6729 100644 --- a/curve25519/curve25519.go +++ b/curve25519/curve25519.go @@ -3,8 +3,8 @@ // license that can be found in the LICENSE file. // We have a implementation in amd64 assembly so this code is only run on -// non-amd64 platforms. -// +build !amd64 +// non-amd64 platforms. The amd64 assembly does not support gccgo. +// +build !amd64 gccgo package curve25519 diff --git a/curve25519/freeze_amd64.s b/curve25519/freeze_amd64.s index 1bb975b..0b80eef 100644 --- a/curve25519/freeze_amd64.s +++ b/curve25519/freeze_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + // func freeze(inout *[5]uint64) TEXT ·freeze(SB),7,$96-8 MOVQ inout+0(FP), DI diff --git a/curve25519/ladderstep_amd64.s b/curve25519/ladderstep_amd64.s index 5e0eeba..10bb89f 100644 --- a/curve25519/ladderstep_amd64.s +++ b/curve25519/ladderstep_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + // func ladderstep(inout *[5][5]uint64) TEXT ·ladderstep(SB),0,$384-8 MOVQ inout+0(FP),DI diff --git a/curve25519/mont25519_amd64.go b/curve25519/mont25519_amd64.go index 996b087..18a651a 100644 --- a/curve25519/mont25519_amd64.go +++ b/curve25519/mont25519_amd64.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build amd64,!gccgo + package curve25519 // These functions are implemented in the .s files. The names of the functions diff --git a/curve25519/mul_amd64.s b/curve25519/mul_amd64.s index a9a569c..5404f32 100644 --- a/curve25519/mul_amd64.s +++ b/curve25519/mul_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + // func mul(dest, a, b *[5]uint64) TEXT ·mul(SB),0,$128-24 MOVQ dest+0(FP), DI diff --git a/curve25519/square_amd64.s b/curve25519/square_amd64.s index dd0247e..cb0053f 100644 --- a/curve25519/square_amd64.s +++ b/curve25519/square_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + // func square(out, in *[5]uint64) TEXT ·square(SB),7,$96-16 MOVQ out+0(FP), DI diff --git a/poly1305/const_amd64.s b/poly1305/const_amd64.s index 0b82192..e26ea67 100644 --- a/poly1305/const_amd64.s +++ b/poly1305/const_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + DATA ·SCALE(SB)/8, $0x37F4000000000000 GLOBL ·SCALE(SB), $8 DATA ·TWO32(SB)/8, $0x41F0000000000000 diff --git a/poly1305/poly1305_amd64.s b/poly1305/poly1305_amd64.s index 9c4bc47..b9ad0ba 100644 --- a/poly1305/poly1305_amd64.s +++ b/poly1305/poly1305_amd64.s @@ -5,6 +5,8 @@ // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html +// +build amd64,!gccgo + // func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]key) TEXT ·poly1305(SB),0,$224-32 MOVQ out+0(FP),DI diff --git a/poly1305/sum_amd64.go b/poly1305/sum_amd64.go index 8da8178..fba23b8 100644 --- a/poly1305/sum_amd64.go +++ b/poly1305/sum_amd64.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build amd64,!gccgo + package poly1305 // This function is implemented in poly1305_amd64.s diff --git a/poly1305/sum_ref.go b/poly1305/sum_ref.go index e617ac5..12568a2 100644 --- a/poly1305/sum_ref.go +++ b/poly1305/sum_ref.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64 +// +build !amd64 gccgo package poly1305 diff --git a/salsa20/salsa/salsa2020_amd64.s b/salsa20/salsa/salsa2020_amd64.s index 6358149..6e1df96 100644 --- a/salsa20/salsa/salsa2020_amd64.s +++ b/salsa20/salsa/salsa2020_amd64.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !appengine +// +build amd64,!appengine,!gccgo // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html diff --git a/salsa20/salsa/salsa20_amd64.go b/salsa20/salsa/salsa20_amd64.go index 93d43da..8a316ed 100644 --- a/salsa20/salsa/salsa20_amd64.go +++ b/salsa20/salsa/salsa20_amd64.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !appengine +// +build amd64,!appengine,!gccgo package salsa diff --git a/salsa20/salsa/salsa20_ref.go b/salsa20/salsa/salsa20_ref.go index 9169134..95f8ca5 100644 --- a/salsa20/salsa/salsa20_ref.go +++ b/salsa20/salsa/salsa20_ref.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64 appengine +// +build !amd64 appengine gccgo package salsa