llvm-6502/test
Peter Collingbourne fbb662f840 Introduce llvm::sys::getProcessTriple() function.
In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
as part of work to allow the user to supply a different default
target triple at configure time.  This change also affected the JIT.
However, it is inappropriate to use the default target triple in the
JIT in most circumstances because this will not necessarily match
the current architecture used by the process, leading to illegal
instruction and other such errors at run time.

Introduce the getProcessTriple() function for use in the JIT and
its clients, and cause the JIT to use it.  On architectures with a
single bitness, the host and process triples are identical.  On other
architectures, the host triple represents the architecture of the
host CPU, while the process triple represents the architecture used
by the host CPU to interpret machine code within the current process.
For example, when executing 32-bit code on a 64-bit Linux machine,
the host triple may be 'x86_64-unknown-linux-gnu', while the process
triple may be 'i386-unknown-linux-gnu'.

This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
platforms.

Differential Revision: http://llvm-reviews.chandlerc.com/D254

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172627 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 17:27:22 +00:00
..
Analysis Make opt grab the triple from the module and use it to initialize the target machine. 2013-01-01 08:00:32 +00:00
Archive
Assembler
Bindings/Ocaml
Bitcode
BugPoint
CodeGen This patch addresses an incorrect transformation in the DAG combiner. 2013-01-14 22:04:38 +00:00
DebugInfo Split address information for DWARF5 split dwarf proposal. This involves 2013-01-15 23:56:56 +00:00
ExecutionEngine Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
Feature There was a switch fall-through in the parser for textual LLVM that caused 2013-01-07 13:32:38 +00:00
FileCheck
Instrumentation ASan: wrap mapping scale and offset in a struct and make it a member of ASan passes. Add test for non-default mapping scale and offset. No functionality change 2013-01-16 13:23:28 +00:00
Integer
JitListener
Linker Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a VectorType. 2013-01-10 10:49:36 +00:00
MC reverting 172579 2013-01-16 01:29:10 +00:00
Object [llvm-objdump] Emit addresses with the correct number of leading 0's. 2013-01-10 22:40:50 +00:00
Other
Scripts
TableGen
tools
Transforms Move test that depends on the x86 target into a target-specific directory. 2013-01-16 13:25:56 +00:00
Unit
Verifier [IR] Add verification for module flags with the "require" behavior. 2013-01-15 20:52:06 +00:00
YAMLParser
CMakeLists.txt
lit.cfg Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
lit.site.cfg.in Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
Makefile Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
Makefile.tests
TestRunner.sh