Skip to content

Add support for riscv64 #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exp2_asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !noasm && !tinygo && (amd64 || 386 || arm || ppc64le || wasm)
//go:build !noasm && !tinygo && (amd64 || 386 || arm || ppc64le || riscv64 || wasm)
// +build !noasm
// +build !tinygo
// +build amd64 386 arm ppc64le wasm
// +build amd64 386 arm ppc64le riscv64 wasm

package math32

Expand Down
4 changes: 2 additions & 2 deletions exp2_noasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build noasm || tinygo || !(amd64 || 386 || arm || ppc64le || wasm)
// +build noasm tinygo !amd64,!386,!arm,!ppc64le,!wasm
//go:build noasm || tinygo || !(amd64 || 386 || arm || ppc64le || riscv64 || wasm)
// +build noasm tinygo !amd64,!386,!arm,!ppc64le,!riscv64,!wasm

package math32

Expand Down
4 changes: 2 additions & 2 deletions exp_asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !noasm && !tinygo && (amd64 || 386 || arm || ppc64le || wasm || s390x)
//go:build !noasm && !tinygo && (amd64 || 386 || arm || ppc64le || riscv64 || wasm || s390x)
// +build !noasm
// +build !tinygo
// +build amd64 386 arm ppc64le wasm s390x
// +build amd64 386 arm ppc64le riscv64 wasm s390x

package math32

Expand Down
4 changes: 2 additions & 2 deletions exp_noasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build noasm || tinygo || !(amd64 || 386 || arm || ppc64le || wasm || s390x)
// +build noasm tinygo !amd64,!386,!arm,!ppc64le,!wasm,!s390x
//go:build noasm || tinygo || !(amd64 || 386 || arm || ppc64le || riscv64 || wasm || s390x)
// +build noasm tinygo !amd64,!386,!arm,!ppc64le,!riscv64,!wasm,!s390x

package math32

Expand Down
4 changes: 2 additions & 2 deletions log_asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !noasm && !tinygo && (amd64 || arm || s390x || 386 || arm64 || ppc64le || wasm)
//go:build !noasm && !tinygo && (amd64 || arm || s390x || 386 || arm64 || ppc64le || riscv64 || wasm)
// +build !noasm
// +build !tinygo
// +build amd64 arm s390x 386 arm64 ppc64le wasm
// +build amd64 arm s390x 386 arm64 ppc64le riscv64 wasm

package math32

Expand Down
4 changes: 2 additions & 2 deletions log_noasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build noasm || tinygo || (!amd64 && !arm && !s390x && !386 && !arm64 && !ppc64le && !wasm)
// +build noasm tinygo !amd64,!arm,!s390x,!386,!arm64,!ppc64le,!wasm
//go:build noasm || tinygo || (!amd64 && !arm && !s390x && !386 && !arm64 && !ppc64le && !riscv64 && !wasm)
// +build noasm tinygo !amd64,!arm,!s390x,!386,!arm64,!ppc64le,!riscv64,!wasm

package math32

Expand Down
4 changes: 2 additions & 2 deletions remainder_asm.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build !noasm && !tinygo && (amd64 || s390x || arm || ppc64le || 386 || wasm)
//go:build !noasm && !tinygo && (amd64 || s390x || arm || ppc64le || riscv64 || 386 || wasm)
// +build !noasm
// +build !tinygo
// +build amd64 s390x arm ppc64le 386 wasm
// +build amd64 s390x arm ppc64le riscv64 386 wasm

package math32

Expand Down
4 changes: 2 additions & 2 deletions remainder_noasm.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build noasm || tinygo || (!amd64 && !s390x && !arm && !ppc64le && !386 && !wasm)
// +build noasm tinygo !amd64,!s390x,!arm,!ppc64le,!386,!wasm
//go:build noasm || tinygo || (!amd64 && !s390x && !arm && !ppc64le && !riscv64 && !386 && !wasm)
// +build noasm tinygo !amd64,!s390x,!arm,!ppc64le,!riscv64,!386,!wasm

package math32

Expand Down
4 changes: 2 additions & 2 deletions sqrt_asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !noasm && !tinygo && (386 || amd64 || arm64 || arm || ppc64le || s390x || wasm)
//go:build !noasm && !tinygo && (386 || amd64 || arm64 || arm || ppc64le || riscv64 || s390x || wasm)
// +build !noasm
// +build !tinygo
// +build 386 amd64 arm64 arm ppc64le s390x wasm
// +build 386 amd64 arm64 arm ppc64le riscv64 s390x wasm

package math32

Expand Down
4 changes: 2 additions & 2 deletions sqrt_noasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build noasm || tinygo || (!386 && !amd64 && !arm64 && !arm && !ppc64le && !s390x && !wasm)
// +build noasm tinygo !386,!amd64,!arm64,!arm,!ppc64le,!s390x,!wasm
//go:build noasm || tinygo || (!386 && !amd64 && !arm64 && !arm && !ppc64le && !riscv64 && !s390x && !wasm)
// +build noasm tinygo !386,!amd64,!arm64,!arm,!ppc64le,!riscv64,!s390x,!wasm

package math32

Expand Down
21 changes: 21 additions & 0 deletions stubs_riscv64.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "textflag.h"

// func archExp(x float32) float32
TEXT ·archExp(SB),NOSPLIT,$0
JMP ·exp(SB)

// func archExp2(x float32) float32
TEXT ·archExp2(SB),NOSPLIT,$0
JMP ·exp2(SB)

// func archLog(x float32) float32
TEXT ·archLog(SB),NOSPLIT,$0
JMP ·log(SB)

// func archRemainder(x, y float32) float32
TEXT ·archRemainder(SB),NOSPLIT,$0
JMP ·remainder(SB)

// func archSqrt(x float32) float32
TEXT ·archSqrt(SB),NOSPLIT,$0
JMP ·sqrt(SB)