Fix PR1836: in the interpreter, read and write apints
authorDuncan Sands <baldrick@free.fr>
Mon, 10 Dec 2007 17:43:13 +0000 (17:43 +0000)
committerDuncan Sands <baldrick@free.fr>
Mon, 10 Dec 2007 17:43:13 +0000 (17:43 +0000)
commit1eff70451fbb079c1d5b8f45ff8c8a2b8f74d7ba
tree6ea58d5ba05a4007f3278611d3c90be7c39f8ab5
parent3a7bcc4d1badce527e2caae2f400c1a91abdbed8
Fix PR1836: in the interpreter, read and write apints
using the minimum possible number of bytes.  For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before.  For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness).  Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this.  Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44796 91177308-0d34-0410-b5e6-96231b3b80d8
autoconf/configure.ac
configure
include/llvm/Config/config.h.in
include/llvm/Target/TargetData.h
lib/ExecutionEngine/ExecutionEngine.cpp
test/ExecutionEngine/2007-12-10-APIntLoadStore.ll [new file with mode: 0644]