From 7ba2c0836c8562f127d173d9d0588c162111793c Mon Sep 17 00:00:00 2001 From: soypat Date: Thu, 19 Sep 2024 14:12:43 -0300 Subject: [PATCH] guard assembly files against tinygo and noasm build tags --- _exp_arm64.s | 1 + _stubs_risc64.s | 3 ++- dim.go | 3 +++ exp_amd64.s | 1 + log_amd64.s | 1 + nextafter.go | 1 + remainder_amd64.s | 1 + sqrt_amd64.s | 1 + sqrt_arm64.s | 1 + stubs_386.s | 1 + stubs_arm.s | 1 + stubs_arm64.s | 1 + stubs_ppc64le.s | 1 + stubs_s390x.s | 1 + stubs_wasm.s | 3 ++- 15 files changed, 19 insertions(+), 2 deletions(-) diff --git a/_exp_arm64.s b/_exp_arm64.s index 26fd81f..d91f266 100644 --- a/_exp_arm64.s +++ b/_exp_arm64.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/_stubs_risc64.s b/_stubs_risc64.s index ba85ce4..fbee974 100644 --- a/_stubs_risc64.s +++ b/_stubs_risc64.s @@ -1,4 +1,5 @@ - #include "textflag.h" +//go:build !tinygo && !noasm +#include "textflag.h" // func archExp(x float32) float32 TEXT ·archExp(SB),NOSPLIT,$0 diff --git a/dim.go b/dim.go index c26c7ab..240862e 100644 --- a/dim.go +++ b/dim.go @@ -3,6 +3,7 @@ package math32 // Dim returns the maximum of x-y or 0. // // Special cases are: +// // Dim(+Inf, +Inf) = NaN // Dim(-Inf, -Inf) = NaN // Dim(x, NaN) = Dim(NaN, x) = NaN @@ -17,6 +18,7 @@ func dim(x, y float32) float32 { // Max returns the larger of x or y. // // Special cases are: +// // Max(x, +Inf) = Max(+Inf, x) = +Inf // Max(x, NaN) = Max(NaN, x) = NaN // Max(+0, ±0) = Max(±0, +0) = +0 @@ -47,6 +49,7 @@ func max(x, y float32) float32 { // Min returns the smaller of x or y. // // Special cases are: +// // Min(x, -Inf) = Min(-Inf, x) = -Inf // Min(x, NaN) = Min(NaN, x) = NaN // Min(-0, ±0) = Min(±0, -0) = -0 diff --git a/exp_amd64.s b/exp_amd64.s index 656d6db..a0a30b4 100644 --- a/exp_amd64.s +++ b/exp_amd64.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm // Copyright 2014 Xuanyi Chew. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/log_amd64.s b/log_amd64.s index 71687a8..1027217 100644 --- a/log_amd64.s +++ b/log_amd64.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSS-style // license that can be found in the LICENSE file. diff --git a/nextafter.go b/nextafter.go index f76ccac..f656c63 100644 --- a/nextafter.go +++ b/nextafter.go @@ -7,6 +7,7 @@ package math32 // Nextafter returns the next representable float32 value after x towards y. // // Special cases are: +// // Nextafter32(x, x) = x // Nextafter32(NaN, y) = NaN // Nextafter32(x, NaN) = NaN diff --git a/remainder_amd64.s b/remainder_amd64.s index f484d0d..0d489ba 100644 --- a/remainder_amd64.s +++ b/remainder_amd64.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/sqrt_amd64.s b/sqrt_amd64.s index f0fe007..a5e025d 100644 --- a/sqrt_amd64.s +++ b/sqrt_amd64.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm #include "textflag.h" // func archSqrt(x float32) float32 diff --git a/sqrt_arm64.s b/sqrt_arm64.s index 2c9d315..515586c 100644 --- a/sqrt_arm64.s +++ b/sqrt_arm64.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/stubs_386.s b/stubs_386.s index 7c4f15f..67baf86 100644 --- a/stubs_386.s +++ b/stubs_386.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm #include "textflag.h" // func archExp(x float32) float32 diff --git a/stubs_arm.s b/stubs_arm.s index f2c0d97..fbee974 100644 --- a/stubs_arm.s +++ b/stubs_arm.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm #include "textflag.h" // func archExp(x float32) float32 diff --git a/stubs_arm64.s b/stubs_arm64.s index 0b2931c..dbbf6b8 100644 --- a/stubs_arm64.s +++ b/stubs_arm64.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm #include "textflag.h" // func archLog(x float64) float64 diff --git a/stubs_ppc64le.s b/stubs_ppc64le.s index 7c4f15f..67baf86 100644 --- a/stubs_ppc64le.s +++ b/stubs_ppc64le.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm #include "textflag.h" // func archExp(x float32) float32 diff --git a/stubs_s390x.s b/stubs_s390x.s index 6faad1e..7e38aea 100644 --- a/stubs_s390x.s +++ b/stubs_s390x.s @@ -1,3 +1,4 @@ +//go:build !tinygo && !noasm #include "textflag.h" // func archExp(x float32) float32 diff --git a/stubs_wasm.s b/stubs_wasm.s index 29b036e..947cc46 100644 --- a/stubs_wasm.s +++ b/stubs_wasm.s @@ -1,4 +1,5 @@ -// +build wasm +//go:build wasm && !tinygo && !noasm +// +build wasm,!tinygo,!noasm #include "textflag.h"