MCPcopy Create free account
hub / github.com/google/gapid / StorePointer

Method StorePointer

gapis/replay/builder/builder.go:451–461  ·  view source on GitHub ↗

StorePointer writes ptr to the target pointer index. Pointers are stored in a separate address space and can only be loaded using PointerIndex values.

(idx value.PointerIndex, ptr value.Pointer)

Source from the content-addressed store, hash-verified

449// Pointers are stored in a separate address space and can only be loaded using
450// PointerIndex values.
451func (b *Builder) StorePointer(idx value.PointerIndex, ptr value.Pointer) {
452 b.instructions = append(b.instructions,
453 asm.Push{Value: ptr},
454 asm.Store{Destination: idx},
455 )
456 rng := memory.Range{
457 Base: uint64(idx) * uint64(b.memoryLayout.GetPointer().GetSize()),
458 Size: uint64(b.memoryLayout.GetPointer().GetSize()),
459 }
460 interval.Merge(&b.pointerMemory, rng.Span(), true)
461}
462
463// Strcpy pops the source address then the target address from the top of the
464// stack, and then copies at most maxCount-1 bytes from source to target. If

Callers

nothing calls this directly

Calls 3

SpanMethod · 0.95
MergeMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected