-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s2: Use GOAMD64_v3 ifdef instead (#486)
Add comment -> ifdef rewriter Upgrade avo
- Loading branch information
Showing
8 changed files
with
531 additions
and
16,523 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//go:build custom | ||
// +build custom | ||
|
||
package main | ||
|
||
import ( | ||
"bytes" | ||
"flag" | ||
"io/ioutil" | ||
"log" | ||
"os" | ||
|
||
"github.com/klauspost/asmfmt" | ||
) | ||
|
||
func main() { | ||
flag.Parse() | ||
args := flag.Args() | ||
for _, file := range args { | ||
data, err := ioutil.ReadFile(file) | ||
if err != nil { | ||
log.Fatalln(err) | ||
} | ||
data = bytes.Replace(data, []byte("\t// #"), []byte("#"), -1) | ||
data, err = asmfmt.Format(bytes.NewBuffer(data)) | ||
if err != nil { | ||
log.Fatalln(err) | ||
} | ||
err = ioutil.WriteFile(file, data, os.ModePerm) | ||
if err != nil { | ||
log.Fatalln(err) | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
module github.com/klauspost/compress/s2/_generate | ||
|
||
go 1.13 | ||
go 1.15 | ||
|
||
require github.com/mmcloughlin/avo v0.2.0 | ||
require ( | ||
github.com/klauspost/asmfmt v1.3.1 | ||
github.com/mmcloughlin/avo v0.4.0 | ||
) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.