The disassembler impl. of MCDisassembler::getInstruction() was using the pattern
authorJohnny Chen <johnny.chen@apple.com>
Mon, 5 Apr 2010 04:46:17 +0000 (04:46 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Mon, 5 Apr 2010 04:46:17 +0000 (04:46 +0000)
commit9d563b676cc9f3bcd9a9806ea5e9a791f35e3d70
treef70185b9324ef2b1edfdf40d5920b151f026800f
parentd7d44bd5a81a4300201064cee1407fe804990320
The disassembler impl. of MCDisassembler::getInstruction() was using the pattern
  uint32_t insn;
  MemoryObject.readBytes(Address, 4, (uint8_t*)&insn, NULL)

to read 4 bytes of memory contents into a 32-bit uint variable.  This leaves the
interpretation of byte order up to the host machine and causes PPC test cases of
arm-tests, neon-tests, and thumb-tests to fail.  Fixed to use a byte array for
reading the memory contents and shift the bytes into place for the 32-bit uint
variable in the ARM case and 16-bit halfword in the Thumb case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100403 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/Disassembler/ARMDisassembler.cpp