MCPcopy Create free account
hub / github.com/eigenform/perfect / align_down

Function align_down

perfect/src/util.rs:527–531  ·  view source on GitHub ↗
(addr: usize, bits: usize)

Source from the content-addressed store, hash-verified

525}
526
527pub fn align_down(addr: usize, bits: usize) -> usize {
528 let align: usize = (1 << bits);
529 let mask: usize = !(align - 1);
530 (addr & mask).wrapping_sub(align)
531}
532
533#[inline(always)]
534pub fn flush_btb<const CNT: usize>() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected