[PATCH] llvm-cov: Support for big-endianness

Yuchen Wu yuchenericwu at hotmail.com
Wed Dec 4 21:46:46 PST 2013


llvm-cov has been modified to read gcov files produced from big-endian machines. In addition, the instrumentation had to be changed to produce endian-friendly data for reading.

[PATCH] llvm-cov: Support for big-endianness.

llvm-cov will read the magic file string from GCNO and GCDA files. If
the expected characters are reversed, GCOVBuffer will set OffEndian to
true and begin byte swapping when reading integers.

Note: gcc and gcov does not write/read true 64-bit integers to/from
files. Instead, a 64-bit integer is broken up into two 32-bit integers
with the less significant 32-bits always preceding the more significant
32-bits. For the sake of conformity, clang and llvm-cov will follow this
format. 		 	   		  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-llvm-cov-Support-for-big-endianness.patch
Type: application/octet-stream
Size: 15308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131205/a2643afb/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-compiler-rt-Support-for-big-endianness.patch
Type: application/octet-stream
Size: 3392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131205/a2643afb/attachment-0001.obj>


More information about the llvm-commits mailing list