Skip to content

Commit

Permalink
[SOL][BPF] Allow misaligned loads (anza-xyz#7)
Browse files Browse the repository at this point in the history
Co-authored-by: Jack May <jack@solana.com>
  • Loading branch information
dmakarov and jackcmay committed May 16, 2021
1 parent 4a40a94 commit faf6ee2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion llvm/lib/Target/BPF/BPFISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,13 @@ BPFTargetLowering::BPFTargetLowering(const TargetMachine &TM,
}

bool BPFTargetLowering::allowsMisalignedMemoryAccesses(
EVT VT, unsigned, unsigned, MachineMemOperand::Flags, bool *) const {
EVT VT, unsigned, unsigned, MachineMemOperand::Flags, bool *Fast) const {
if (!VT.isSimple()) {
return false;
}
if (Fast) {
*Fast = true;
}
return true;
}

Expand Down

0 comments on commit faf6ee2

Please sign in to comment.