-
Notifications
You must be signed in to change notification settings - Fork 1
Added Aarch64 extern function support #46
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
- Coverage 42.60% 42.32% -0.28%
==========================================
Files 114 114
Lines 4253 4281 +28
==========================================
Hits 1812 1812
- Misses 2355 2383 +28
Partials 86 86 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This pull request introduces support for Aarch64 extern functions by updating symbol handling, branch relocation registration, and file code generation context.
- Conditionally set symbol properties for defined functions in the translation phase.
- Register relocations for branch instructions when target offsets are unavailable.
- Add helper methods for computing instruction offsets and manage function indices and relocations in file codegen.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| aarch64/translation/file.go | Updates symbol creation to conditionally set section and offset for defined functions. |
| aarch64/isa/bl.go | Adds relocation registration and updates branch instruction generation. |
| aarch64/codegen/instruction.go | Introduces a helper to compute instruction offset in file. |
| aarch64/codegen/file.go | Enhances file codegen context with function indices and relocations management. |
Files not reviewed (2)
- examples/aarch64/bl-extern.usm: Language not supported
- go.mod: Language not supported
Comments suppressed due to low confidence (2)
aarch64/translation/file.go:37
- The conditional update of symbol properties for defined functions may leave undefined symbols with zero or uninitialized section and offset values; please confirm that this behavior is intentional and that it will not adversely affect symbol resolution.
if function.IsDefined() {
aarch64/isa/bl.go:43
- Returning a BL(0) placeholder when the target offset lookup fails could inadvertently introduce an incorrect branch target; consider defining a clear fallback strategy or documenting why BL(0) is safe in this context.
targetOffset, ok := ctx.FunctionOffsets[b.Target]
No description provided.