[PATCH] D13189: Add support for sub-byte aligned writes to lib/Support/Endian.h

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 22:02:09 PDT 2015

tejohnson created this revision.
tejohnson added a reviewer: dexonsmith.
tejohnson added a subscriber: llvm-commits.

As per Duncan's review for D12536, I extracted the sub-byte bit aligned
reading and writing code into lib/Support. Added calls from

I made the support general instead of tailoring it to the specific
use case and data type in the BackpatchWord case. However, I am not
sure how to add unit testing for the other data types. I did test it
for signed types with negative values to ensure the shifting/masking
handled the sign bit properly, by temporarily adding some write/read
calls into llvm operating on a temporary array.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13189.35794.patch
Type: text/x-patch
Size: 4720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150926/d131a221/attachment.bin>

More information about the llvm-commits mailing list