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

Method StoreUnaligned

core/codegen/value.go:84–95  ·  view source on GitHub ↗

StoreUnaligned stores val to the pointer ptr. It assumes that the destination address may be unaligned

(val *Value)

Source from the content-addressed store, hash-verified

82// StoreUnaligned stores val to the pointer ptr. It assumes that the
83// destination address may be unaligned
84func (v *Value) StoreUnaligned(val *Value) {
85 if !IsPointer(v.ty) {
86 fail("Store must be to a pointer. Got %v", v.Type)
87 }
88 elTy := v.Type().(Pointer).Element
89 if val.ty.String() != elTy.String() {
90 fail("Attempted to store value of type %v to pointer element type %v",
91 val.ty.TypeName(), elTy.TypeName())
92 }
93 store := v.b.llvm.CreateStore(val.llvm, v.llvm)
94 store.SetAlignment(1)
95}
96
97// Store stores val to the pointer ptr.
98func (v *Value) Store(val *Value) {

Callers 1

buildTypesMethod · 0.80

Calls 5

TypeMethod · 0.95
IsPointerFunction · 0.85
failFunction · 0.70
StringMethod · 0.65
TypeNameMethod · 0.65

Tested by

no test coverage detected