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

Method LoadUnaligned

core/codegen/value.go:72–80  ·  view source on GitHub ↗

LoadUnaligned loads the element from the pointer value, it allows the loaded value to be unaligned

()

Source from the content-addressed store, hash-verified

70// LoadUnaligned loads the element from the pointer value, it allows the loaded
71// value to be unaligned
72func (v *Value) LoadUnaligned() *Value {
73 if !IsPointer(v.ty) {
74 fail("Load must be from a pointer. Got %v", v.Type)
75 }
76 elTy := v.Type().(Pointer).Element
77 load := v.b.llvm.CreateLoad(v.llvm, v.name)
78 load.SetAlignment(1)
79 return v.b.val(elTy, load)
80}
81
82// StoreUnaligned stores val to the pointer ptr. It assumes that the
83// destination address may be unaligned

Callers 1

buildTypesMethod · 0.80

Calls 4

TypeMethod · 0.95
IsPointerFunction · 0.85
failFunction · 0.70
valMethod · 0.45

Tested by

no test coverage detected