[llvm-dev] Help to understand a store instruction

Alberto Barbaro via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 15 05:07:21 PST 2019

Hi all,
Yesterday I managed to obtain the IR of libpng and while I was going
through the code I found out that within the function png_write_sig[1] the
signature is created using a store instruction like the following: store
i64 727905341920923785, i64 %2, align 8, !dbg, !40041. %2 is the array...

That massive number is the hexadecimal representation of the png signature
but with the bytes in reverse order.

Can someone explain me why? If seen other similar instructions and the
integer value on the left was not reversed...

I can only think about little and big endian...

Thanks in advance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191115/0438344a/attachment.html>

More information about the llvm-dev mailing list