-
Notifications
You must be signed in to change notification settings - Fork 201
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
fix: fixes #619 help go mod vendor to include files #620
Merged
Conversation
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
Suggested edit: diff --git a/field/asm/.gitignore b/field/asm/.gitignore
index d21c226a7..d9d3470d3 100644
--- a/field/asm/.gitignore
+++ b/field/asm/.gitignore
@@ -1,5 +1,7 @@
# generated by integration tests
-element_2w/**
-element_3w/**
-element_7w/**
-element_8w/**
\ No newline at end of file
+element_4w/**
+element_5w/**
+element_6w/**
+element_10w/**
+element_12w/**
+element_31b/**
\ No newline at end of file
|
ivokub
reviewed
Jan 31, 2025
Suggested edit: diff --git a/field/generator/asm/amd64/build.go b/field/generator/asm/amd64/build.go
index 41219d576..a63a1f6cb 100644
--- a/field/generator/asm/amd64/build.go
+++ b/field/generator/asm/amd64/build.go
@@ -284,7 +284,7 @@ func ElementASMFileName(nbWords, nbBits int) string {
const fWN = "element_%dw"
if nbWords == 1 {
- return filepath.Join(fmt.Sprintf(fW1, 31), fmt.Sprintf(nameW1, 31))
+ return filepath.Join(fmt.Sprintf(fW1, nbBits), fmt.Sprintf(nameW1, nbBits))
}
return filepath.Join(fmt.Sprintf(fWN, nbWords), fmt.Sprintf(nameWN, nbWords))
}
@@ -294,7 +294,7 @@ func ElementASMBaseDir(nbWords, nbBits int) string {
const fWN = "element_%dw"
if nbWords == 1 {
- return fmt.Sprintf(fW1, 31)
+ return fmt.Sprintf(fW1, nbBits)
}
return fmt.Sprintf(fWN, nbWords)
}
diff --git a/field/generator/asm/arm64/build.go b/field/generator/asm/arm64/build.go
index d6f035551..1fb96c9f1 100644
--- a/field/generator/asm/arm64/build.go
+++ b/field/generator/asm/arm64/build.go
@@ -220,7 +220,7 @@ func ElementASMFileName(nbWords, nbBits int) string {
const fW1 = "element_%db"
const fWN = "element_%dw"
if nbWords == 1 {
- return filepath.Join(fmt.Sprintf(fW1, 31), fmt.Sprintf(nameW1, 31))
+ return filepath.Join(fmt.Sprintf(fW1, nbBits), fmt.Sprintf(nameW1, nbBits))
}
return filepath.Join(fmt.Sprintf(fWN, nbWords), fmt.Sprintf(nameWN, nbWords))
}
|
ivokub
approved these changes
Jan 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See suggests and a single comment. Otherwise looks perfect. I also tried out in an empty project and solves the issue.
can't do, we need 4w etc they are imported :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #619 .
Idea is just to hint to
go mod vendor
to include some assembly file by making it believe the subfolders inasm
are actual go packages.(in fact they just contains dummy constants and code that won't be linked, but the .s files are "included" à-la-C-preprocessor into other .s files)