[SOL] Backport SBPFv3 to LLVM 19 - #206
Draft
LucasSte wants to merge 18 commits into
Draft
Conversation
* Invert indexes for dynamic stack frames in v3 * Fix rebase conflicts
* Change stack growth direction * Nagisa's review
* Remove option to optimize the stack usage * Create feature NoStackGaps * Remove dynamic frames from V3 * Fix warning message * Nagisa's review
* Adjust offsets for sBPFv3 * Update llvm/lib/Target/SBF/SBFRegisterInfo.cpp Co-authored-by: Joe C <jcaulfield135@gmail.com> --------- Co-authored-by: Joe C <jcaulfield135@gmail.com>
* Fix reloc * Add a test
The blanket sign extension whenever an integer argument is 32 bytes is wrong for some other libcalls such as the u32->f64 conversion. The libcall for that expects to get upper 32 bits to be zeroed. SBF code we have right now would sign extend that argument despite it being an unsigned integer anyway. Instead I applied a more targetted fix for FPOWI/LDEXP that marks these instructions as dealing with signed integers so that the `shouldSignExtend...` function gets the correct `IsSigned` flag in the first place for these libcalls. Will explore submitting this after cleaning it up upstream as well.
LucasSte
force-pushed
the
v3-backport-19
branch
from
August 6, 2026 21:52
eb29dc1 to
7a5a496
Compare
|
You will need to apply the following patch and after that with anza-xyz/rust#156 all libcore tests pass. diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index b055972512a8..430f2c9120d7 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -60,6 +60,7 @@ TargetInfo *elf::getTarget() {
return getARMTargetInfo();
case EM_AVR:
return getAVRTargetInfo();
+ case EM_BPF:
case EM_SBF:
return getSBFTargetInfo();
case EM_HEXAGON: |
* Fix warning overflow * Add a regression test
LucasSte
force-pushed
the
v3-backport-19
branch
from
August 14, 2026 17:35
a6645aa to
0980516
Compare
LucasSte
force-pushed
the
v3-backport-19
branch
from
August 14, 2026 17:40
0980516 to
9618d1f
Compare
Author
|
I tested LLVM, Clang, LLDB and LLD on my dev box, and only got failures in LLDB. If we want it, I removed the failing cases in LucasSte@15da9c4. Those cases appear to be all unrelated. |
Author
|
On MacOS, I only get the failure due to the |
This file contains hidden or 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
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.
No description provided.