LoadUnaligned loads the element from the pointer value, it allows the loaded value to be unaligned
()
| 70 | // LoadUnaligned loads the element from the pointer value, it allows the loaded |
| 71 | // value to be unaligned |
| 72 | func (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 |
no test coverage detected