-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gnovm): add software floating point package (#3185)
Closes: #312 The idea to use softfloat and work originates from this PR: #2863 <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details> --------- Co-authored-by: Morgan Bazalgette <[email protected]> Co-authored-by: Miloš Živković <[email protected]>
- Loading branch information
1 parent
ddfff60
commit 663edac
Showing
15 changed files
with
1,360 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# softfloat64.go: | ||
# - add header | ||
# - change package name | ||
cat > runtime_softfloat64.go << EOF | ||
// Code generated by copy.sh. DO NOT EDIT. | ||
// This file is copied from \$GOROOT/src/runtime/softfloat64.go. | ||
// It is the software floating point implementation used by the Go runtime. | ||
EOF | ||
cat "$GOROOT/src/runtime/softfloat64.go" >> ./runtime_softfloat64.go | ||
sed -i 's/^package runtime$/package softfloat/' runtime_softfloat64.go | ||
|
||
# softfloat64_test.go: | ||
# - add header | ||
# - change package name | ||
# - change import to right package | ||
# - change GOARCH to runtime.GOARCH, and import the "runtime" package | ||
cat > runtime_softfloat64_test.go << EOF | ||
// Code generated by copy.sh. DO NOT EDIT. | ||
// This file is copied from \$GOROOT/src/runtime/softfloat64_test.go. | ||
// It is the tests for the software floating point implementation | ||
// used by the Go runtime. | ||
EOF | ||
cat "$GOROOT/src/runtime/softfloat64_test.go" >> ./runtime_softfloat64_test.go | ||
sed -i 's/^package runtime_test$/package softfloat_test/ | ||
s#^\t\. "runtime"$#\t. "github.com/gnolang/gno/gnovm/pkg/gnolang/internal/softfloat"# | ||
s/GOARCH/runtime.GOARCH/g | ||
16a\ | ||
"runtime"' runtime_softfloat64_test.go |
Oops, something went wrong.