OSDN Git Service

The constant initialization for globals in NVPTX is generated as an
authorSamuel Antao <sfantao@us.ibm.com>
Tue, 9 Jun 2015 16:29:34 +0000 (16:29 +0000)
committerSamuel Antao <sfantao@us.ibm.com>
Tue, 9 Jun 2015 16:29:34 +0000 (16:29 +0000)
commit8e8c4b5615b35d813089951f4568178b181906f2
tree8e56a46185ce447b11d6bfb3cfcd820d5956cea8
parenta0c9e11a2be44c73a38b8645931f032e6a8e260b
The constant initialization for globals in NVPTX is generated as an
array of bytes. The generation of this byte arrays was expecting
the host to be little endian, which prevents big endian hosts to be
used in the generation of the PTX code. This patch fixes the
problem by changing the way the bytes are extracted so that it
works for either little and big endian.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239412 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
test/CodeGen/NVPTX/globals_init.ll [new file with mode: 0644]