Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: solana-labs/rbpf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ccfd894e64485050fbebc2ea25fd18522c156cc0
Choose a base ref
..
head repository: solana-labs/rbpf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 147f5f14dc340bb4bf86da35ece458ea951d3489
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/jit.rs
4 changes: 2 additions & 2 deletions src/jit.rs
Original file line number Diff line number Diff line change
@@ -1292,9 +1292,9 @@ impl<'a, C: ContextObject> JitCompiler<'a, C> {

fn emit_result_is_err(&mut self, destination: u8) {
let ok = ProgramResult::Ok(0);
let ok_discriminant = unsafe { *(&ok as *const _ as *const u64) };
let err_kind = unsafe { *(&ok as *const _ as *const u64).add(1) };
self.emit_ins(X86Instruction::lea(OperandSize::S64, RBP, destination, Some(X86IndirectAccess::Offset(self.slot_on_environment_stack(RuntimeEnvironmentSlot::ProgramResult)))));
self.emit_ins(X86Instruction::cmp_immediate(OperandSize::S64, destination, ok_discriminant as i64, Some(X86IndirectAccess::Offset(0))));
self.emit_ins(X86Instruction::cmp_immediate(OperandSize::S64, destination, err_kind as i64, Some(X86IndirectAccess::Offset(0))));
}

fn emit_subroutines(&mut self) {