Skip to content

Commit

Permalink
guard assembly files against tinygo and noasm build tags
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat committed Sep 19, 2024
1 parent 7caa3bb commit 7ba2c08
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions _exp_arm64.s
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion _stubs_risc64.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "textflag.h"
//go:build !tinygo && !noasm
#include "textflag.h"

// func archExp(x float32) float32
TEXT ·archExp(SB),NOSPLIT,$0
Expand Down
3 changes: 3 additions & 0 deletions dim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions exp_amd64.s
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions log_amd64.s
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions nextafter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions remainder_amd64.s
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions sqrt_amd64.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !tinygo && !noasm
#include "textflag.h"

// func archSqrt(x float32) float32
Expand Down
1 change: 1 addition & 0 deletions sqrt_arm64.s
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions stubs_386.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !tinygo && !noasm
#include "textflag.h"

// func archExp(x float32) float32
Expand Down
1 change: 1 addition & 0 deletions stubs_arm.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !tinygo && !noasm
#include "textflag.h"

// func archExp(x float32) float32
Expand Down
1 change: 1 addition & 0 deletions stubs_arm64.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !tinygo && !noasm
#include "textflag.h"

// func archLog(x float64) float64
Expand Down
1 change: 1 addition & 0 deletions stubs_ppc64le.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !tinygo && !noasm
#include "textflag.h"

// func archExp(x float32) float32
Expand Down
1 change: 1 addition & 0 deletions stubs_s390x.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !tinygo && !noasm
#include "textflag.h"

// func archExp(x float32) float32
Expand Down
3 changes: 2 additions & 1 deletion stubs_wasm.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build wasm
//go:build wasm && !tinygo && !noasm
// +build wasm,!tinygo,!noasm

#include "textflag.h"

Expand Down

0 comments on commit 7ba2c08

Please sign in to comment.