rbpf icon indicating copy to clipboard operation
rbpf copied to clipboard

jit: add support for aarch64

Open ndrewh opened this issue 3 years ago • 4 comments

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.

ndrewh avatar Jul 19 '22 17:07 ndrewh

Codecov Report

Attention: Patch coverage is 36.58970% with 1785 lines in your changes missing coverage. Please review.

Project coverage is 74.81%. Comparing base (e8243ec) to head (08f796b). Report is 207 commits behind head on main.

Files with missing lines Patch % Lines
src/jit_arm64.rs 0.00% 1078 Missing :warning:
src/arm64.rs 0.00% 628 Missing :warning:
src/jit_x86.rs 94.89% 52 Missing :warning:
src/jit.rs 69.66% 27 Missing :warning:
Additional details and impacted files
@@             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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jul 19 '22 19:07 codecov-commenter

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

addisoncrump avatar Jul 21 '22 23:07 addisoncrump

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

addisoncrump avatar Jul 23 '22 16:07 addisoncrump

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?

nooperpudd avatar Mar 03 '23 07:03 nooperpudd