Lines Matching refs:unaligned

9 unaligned accesses, why you need to write code that doesn't cause them,
13 The definition of an unaligned access
19 reading 4 bytes of data from address 0x10005 would be an unaligned memory
46 Why unaligned access is bad
49 The effects of performing an unaligned memory access vary from architecture
53 - Some architectures are able to perform unaligned memory accesses
55 - Some architectures raise processor exceptions when unaligned accesses
56 happen. The exception handler is able to correct the unaligned access,
58 - Some architectures raise processor exceptions when unaligned accesses
60 unaligned access to be corrected.
61 - Some architectures are not capable of unaligned memory access, but will
65 It should be obvious from the above that if your code causes unaligned
70 Code that does not cause unaligned access
89 not be unreasonable to expect that accessing field2 would cause an unaligned
105 will never cause an unaligned access, because all memory addresses are evenly
130 lead to unaligned accesses when accessing fields that do not satisfy
133 the memory access in a way that does not cause unaligned access. Of course,
139 Code that causes unaligned access
143 that can cause an unaligned memory access. The following function taken
161 In the above function, when the hardware has efficient unaligned access
167 (Hint: it'd be an unaligned access.)
169 Despite the potential unaligned access problems with the above function, it
177 Here is another example of some code that could cause unaligned accesses:
185 This code will cause unaligned accesses every time the data parameter points
188 In summary, the 2 main scenarios where you may run into unaligned access
194 Avoiding unaligned accesses
197 The easiest way to avoid unaligned access is to use the get_unaligned() and
198 put_unaligned() macros provided by the <asm/unaligned.h> header file.
200 Going back to an earlier example of code that potentially causes unaligned
210 To avoid the unaligned memory access, you would rewrite it as follows:
221 memory and you wish to avoid unaligned access, its usage is as follows:
227 aligned memory, using these macros to access unaligned memory can be costly in
232 Due to the byte-wise nature of this operation, unaligned accesses are avoided.