Skip to content
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

jit: add support for aarch64 #358

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ndrewh
Copy link

@ndrewh ndrewh commented Jul 19, 2022

This contribution is on behalf of Trail of Bits.

This adds support for aarch64 code generation to the JIT. This refactors the architecture-specific code emission parts of the existing x86 JIT into a new JitCompilerX86 struct, which adopts a new JitCompilerImpl trait.

The aarch64 JIT was modeled closely after the x86 JIT. Although all tests pass, the new aarch64 JIT is not ready for production use, and is gated behind a feature flag: jit-aarch64-not-safe-for-production.

Add feature flag for new JIT support
@codecov-commenter
Copy link

Codecov Report

Merging #358 (08f796b) into main (e8243ec) will decrease coverage by 15.40%.
The diff coverage is 36.58%.

@@             Coverage Diff             @@
##             main     #358       +/-   ##
===========================================
- Coverage   90.21%   74.81%   -15.41%     
===========================================
  Files          21       24        +3     
  Lines        8312    10080     +1768     
===========================================
+ Hits         7499     7541       +42     
- Misses        813     2539     +1726     
Impacted Files Coverage Δ
src/arm64.rs 0.00% <0.00%> (ø)
src/jit_arm64.rs 0.00% <0.00%> (ø)
src/lib.rs 100.00% <ø> (ø)
src/jit.rs 84.43% <69.66%> (-9.07%) ⬇️
src/jit_x86.rs 94.89% <94.89%> (ø)
src/elf.rs 88.80% <100.00%> (+<0.01%) ⬆️
src/x86.rs 85.83% <100.00%> (ø)

@addisoncrump
Copy link

Differential fuzzing this with the interpreter for 24 hours. I'll let you know if I find anything.

@addisoncrump
Copy link

No detected misbehaviour from fuzzing. I've DM'd you already about some of the other issues.

@nooperpudd
Copy link

Hi, I'm trying to build the ARM64 target with solana latest release, but i'm not sure if this PR cloud be merge can resolve the build error in solana?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants