mirror of
https://github.com/sliverarmory/reflektor
synced 2026-08-25 09:14:48 +00:00
21 lines
467 B
Go
21 lines
467 B
Go
//go:build linux && !android && ppc64le && !cgo
|
|
|
|
package memmod
|
|
|
|
const ppc64CacheBlockSize uintptr = 32
|
|
|
|
//go:noescape
|
|
func flushPPC64InstructionCache(start, end uintptr)
|
|
|
|
func flushLinuxInstructionCache(start, end uintptr) error {
|
|
if start >= end {
|
|
return nil
|
|
}
|
|
start &^= ppc64CacheBlockSize - 1
|
|
if remainder := end & (ppc64CacheBlockSize - 1); remainder != 0 {
|
|
end += ppc64CacheBlockSize - remainder
|
|
}
|
|
flushPPC64InstructionCache(start, end)
|
|
return nil
|
|
}
|