Skip to content

SIMD-0321: Provide pointer to instruction data in VM r2#7009

Merged
buffalojoec merged 4 commits intoanza-xyz:masterfrom
buffalojoec:r2-instruction-pointer-impl
Sep 23, 2025
Merged

SIMD-0321: Provide pointer to instruction data in VM r2#7009
buffalojoec merged 4 commits intoanza-xyz:masterfrom
buffalojoec:r2-instruction-pointer-impl

Conversation

@buffalojoec
Copy link
Copy Markdown

@buffalojoec buffalojoec commented Jul 17, 2025

Implementation of SIMD-0321, which provides a pointer to the instruction data in the VM's register 2.

@mergify
Copy link
Copy Markdown

mergify Bot commented Jul 17, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@buffalojoec buffalojoec force-pushed the r2-instruction-pointer-impl branch 4 times, most recently from b101644 to f4bead8 Compare July 18, 2025 05:31
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 18, 2025

Codecov Report

❌ Patch coverage is 91.25000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.9%. Comparing base (3684e58) to head (2249bcf).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #7009     +/-   ##
=========================================
- Coverage    82.9%    82.9%   -0.1%     
=========================================
  Files         823      823             
  Lines      360873   360908     +35     
=========================================
+ Hits       299369   299381     +12     
- Misses      61504    61527     +23     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@buffalojoec buffalojoec force-pushed the r2-instruction-pointer-impl branch 2 times, most recently from 4664397 to 2d9863a Compare August 25, 2025 20:14
@buffalojoec buffalojoec marked this pull request as ready for review August 25, 2025 20:30
@buffalojoec buffalojoec requested a review from a team as a code owner August 25, 2025 20:30
Comment thread programs/bpf_loader/src/lib.rs Outdated
Comment thread ledger-tool/src/program.rs
@buffalojoec buffalojoec changed the title [DRAFT]: SIMD-0321: Provide pointer to instruction data in VM r2 SIMD-0321: Provide pointer to instruction data in VM r2 Aug 29, 2025
@buffalojoec buffalojoec force-pushed the r2-instruction-pointer-impl branch from 53b4a39 to 51d13cd Compare August 29, 2025 07:28
Comment thread programs/sbf/rust/r2_instruction_data_pointer/src/lib.rs Outdated
@buffalojoec buffalojoec force-pushed the r2-instruction-pointer-impl branch from 51d13cd to dbcc742 Compare September 2, 2025 18:55

#[no_mangle]
pub unsafe extern "C" fn entrypoint(_input: *mut u8, instruction_data_addr: *const u8) -> u64 {
let instruction_data_len = *((instruction_data_addr as u64 - 8) as *const u64);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let instruction_data_len = *((instruction_data_addr as u64 - 8) as *const u64);
let instruction_data_len = *(instruction_data_addr.sub(8) as *const u64);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you guys give full reviews please, instead of these fly-by one-off comments? I'd rather just resolve everything once.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is pedantic.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed your entire PR. That was the only comment that I had.

LucasSte
LucasSte previously approved these changes Sep 3, 2025
@buffalojoec buffalojoec merged commit 98053de into anza-xyz:master Sep 23, 2025
54 checks passed
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.

4 participants