1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
Reid Kleckner
b82543f2f3 Actually, use GNU inline asm for cpuid with clang
Clang doesn't support the MSVC __cpuid intrinsic yet, and fixing that is
blocked on some fairly complicated issues.

llvm-svn: 188584
2013-08-16 22:42:42 +00:00
Reid Kleckner
fbab94162c Use the MSVC __cpuid intrinsic instead of inline asm
This works around PR16830 in LLVM when self-hosting clang on Windows.

llvm-svn: 188397
2013-08-14 18:21:51 +00:00
Benjamin Kramer
9fe2707840 Some Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.
PR16721.

llvm-svn: 187350
2013-07-29 11:02:08 +00:00
Duncan Sands
ab07390e4a Ensure sys::getProcessTriple always uses a normalized triple. Patch by
Thomas B. Jablin, from PR16636.

llvm-svn: 186501
2013-07-17 11:01:05 +00:00
Tobias Grosser
30e2ef9685 Make host ARM CPU feature detection independent of the vendor
For ARM on linux we use /proc/cpuinfo to detect the host CPU's features.
Linux derives these values without ever looking at the vendor of the
specific CPU implementation. Hence, it adds little value, if we parse
the output of /proc/cpuinfo only for certain vendors.

This patch enables us to derive the correct feature flags e.g. for Qualcomm
CPUs.

llvm-svn: 183790
2013-06-11 21:45:01 +00:00
Tim Northover
f5d9c9ba13 Allow host triple to be correctly overridden in CMake builds
The intended semantics mirror autoconf, where the user is able to
specify a host triple, but if it's left to the build system then
"config.guess" is invoked for the default.

This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to
fit in with the style of the surrounding defines.

llvm-svn: 181112
2013-05-04 07:36:23 +00:00
Benjamin Kramer
96ad18d591 X86: Add target description for btver2; make autodetection logic aware of AVX.
llvm-svn: 181005
2013-05-03 10:20:08 +00:00
Aaron Ballman
48ab17bb7b Testing for _XCR_XFEATURE_ENABLED_MASK instead of a specific MSVC version because some MSVC 2010 SP1 installations do not have the _xgetbv intrinsic. Patch thanks to Serge Pavlov!
llvm-svn: 180125
2013-04-23 17:38:44 +00:00
Craig Topper
19930f378f Convert windows line endings to linux/unix line endings.
llvm-svn: 179995
2013-04-22 05:38:01 +00:00
Aaron Ballman
3d040e9fc0 Ensuring that both bits are set, and not just a combination of one or the other.
llvm-svn: 178674
2013-04-03 18:00:22 +00:00
Aaron Ballman
1e35169e8e Testing for Visual Studio 2010 SP1 or greater before calling the _xgetbv intrinsic. This also fixes a minor code formatting issue.
llvm-svn: 178666
2013-04-03 16:28:24 +00:00
Aaron Ballman
379439a23a Second pass at addressing PR15351 by explicitly checking for AVX support
when getting the host processor information.  It emits a .byte sequence on GNUC compilers to work around lack of xgetbv support with older assemblers, and resolves a comment typo found in the previous patch.

llvm-svn: 178636
2013-04-03 12:25:06 +00:00
Aaron Ballman
6a1038a368 Rolling back the AVX support patch due to breaking a gcc 4.6 build bot that doesn't understand the xgetbv instruction for some reason. Will revisit when time permits.
llvm-svn: 178614
2013-04-03 03:11:39 +00:00
Aaron Ballman
2c49125f3c Attempting to fix the build on older GCC versions.
llvm-svn: 178604
2013-04-03 01:39:37 +00:00
Aaron Ballman
2aff750f79 This patch addresses PR15351 by explicitly checking for AVX support
when getting the host processor information.

llvm-svn: 178598
2013-04-03 00:33:32 +00:00
Roman Divacky
a9e4367232 Add support for autodetection of ADM bdver2.
llvm-svn: 176130
2013-02-26 22:41:01 +00:00
Peter Collingbourne
5f190b5e4e 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

llvm-svn: 172627
2013-01-16 17:27:22 +00:00
Hao Liu
40669c94de Define getHostCPUFeatures for ARM Linux platform
llvm-svn: 170085
2012-12-13 02:40:20 +00:00
Chandler Carruth
a490793037 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131
2012-12-03 16:50:05 +00:00
James Molloy
8f05183ca1 Add support for Cortex-A15 host recognition.
No testcase, as this is only testable on a C-A15 board.

llvm-svn: 167108
2012-10-31 09:07:37 +00:00
Benjamin Kramer
058817c6d4 Add support for detecting some corei7-class Xeons.
llvm-svn: 164714
2012-09-26 18:21:47 +00:00
Roman Divacky
a811b158e5 Add support for AMD Geode.
llvm-svn: 163710
2012-09-12 14:36:02 +00:00
Preston Gurd
6d82adeada Adds the family codes for the Midview Atom processors so that the
Atom buildbot will auto-detect Atom.

llvm-svn: 160521
2012-07-19 19:05:37 +00:00
Preston Gurd
d2b344c685 This patch fixes 8 out of 20 unexpected failures in "make check"
when run on an Intel Atom processor. The failures have arisen due
to changes elsewhere in the trunk over the past 8 weeks or so.

These failures were not detected by the Atom buildbot because the
CPU on the Atom buildbot was not being detected as an Atom CPU.
The fix for this problem is in Host.cpp and X86Subtarget.cpp, but
shall remain commented out until the current set of Atom test failures
are fixed.

Patch by Andy Zhang and Tyler Nowicki!

llvm-svn: 160451
2012-07-18 20:49:17 +00:00
Benjamin Kramer
156f57612b Implement getHostCPUName for ARM/linux. This will be used to implement -march=native in clang.
The cpuid registers are only available in privileged mode so we don't have
an OS-independent way of implementing this. ARM doesn't provide a list of
processor IDs so the list is somewhat incomplete.

llvm-svn: 159228
2012-06-26 21:36:32 +00:00
Hal Finkel
6a80441b25 Fixes for PPC host detection and features.
POWER4 is a 64-bit CPU (better matched to the 970).
The g3 is really the 750 (no altivec), the g4+ is the 74xx (not the 750).

Patch by Andreas Tobler.

llvm-svn: 158363
2012-06-12 16:39:23 +00:00
Hal Finkel
f29a217a58 Reapply r158337, this time properly protect Darwin/PPC host CPU use with __ppc__.
Original commit message:
Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName().

Both the new Linux functionality and the old Darwin functions have been moved.
This change also allows this information to be queried directly by clang and
other frontends (clang, for example, will now have real -mcpu=native support).

llvm-svn: 158349
2012-06-12 03:03:13 +00:00
Jakob Stoklund Olesen
dd5f904ac0 Revert r158337 "Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName()."
This commit broke most of the PowerPC unit tests when running on
Intel/Apple.

llvm-svn: 158345
2012-06-12 00:58:40 +00:00
Hal Finkel
d1e6c8928a Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName().
Both the new Linux functionality and the old Darwin functions have been moved.
This change also allows this information to be queried directly by clang and
other frontends (clang, for example, will now have real -mcpu=native support).

llvm-svn: 158337
2012-06-11 23:14:31 +00:00
Bob Wilson
2c54f42ad2 Use the cpuid 64 bit flag to pick the default CPU name for an unknown model.
For the Family 6 switch in sys::getHostCPUName, an unrecognized model was
reported as "i686".  That's a really bad default since it means that new
CPUs will be treated as if they can only use 32-bit code.  This just looks
at the cpuid extended feature flag for 64 bit support, and if that is set,
it uses a default x86-64 cpu.  Similar logic is already used for the Family
15 code.  <rdar://problem/11314502>

llvm-svn: 156486
2012-05-09 17:47:03 +00:00
Preston Gurd
24f13ffba6 Change the Intel Atom detection code to recognize
Lincroft and Medfield.

llvm-svn: 156025
2012-05-02 21:38:46 +00:00
Evan Cheng
addf0dcf31 Add a missing cpu subtype.
llvm-svn: 155402
2012-04-23 22:41:39 +00:00
David Blaikie
2526691971 Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)
llvm-svn: 148284
2012-01-17 04:43:56 +00:00
Benjamin Kramer
1f1a76c7af Add definitions for AMD's bobcat (aka btver1)
llvm-svn: 147846
2012-01-10 11:50:02 +00:00
Benjamin Kramer
95a0674b1b Autodetect bulldozers.
llvm-svn: 145607
2011-12-01 18:24:17 +00:00
Benjamin Kramer
d710063e1e Intel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.
llvm-svn: 138573
2011-08-25 18:05:56 +00:00
Bob Wilson
31bcafb0cd Update comments for SandyBridge CPU identifiers.
llvm-svn: 134759
2011-07-08 22:33:59 +00:00
Bob Wilson
449492b47c Recognize Intel CPUs with Family=6 and Model=44.
According to Intel Application Note 485, this value is used for
"Intel Core i7 and Intel Xeon processor".  Just include it with the other
"corei7-avx" entries.

llvm-svn: 134750
2011-07-08 22:09:35 +00:00
Chris Lattner
af60d3ba93 add another sandybridge alias.
llvm-svn: 132772
2011-06-09 06:38:17 +00:00
Benjamin Kramer
83096d1db1 Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.
llvm-svn: 131730
2011-05-20 15:11:26 +00:00
Roman Divacky
52e462b5e5 Add support for detection of Intel SandyBridge.
llvm-svn: 128920
2011-04-05 20:25:36 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00