Commit Graph

16 Commits

Author SHA1 Message Date
Simon Atanasyan 3552d3e0f7 [mips] Add `octeon+` to the list of CPUs accepted by the driver 2019-11-07 13:58:50 +03:00
Simon Atanasyan e60eae4256 [driver][mips] Adjust target triple's environment accordingly to provided ABI name
For MIPS we need to adjust not only architecture name accordingly to ABI
provided by the `-mabi` command line option, but also modify triple's
environment. For example, for `mips-linux-gnu` triple and `-mabi=n32`
option a correct final triple is `mips64-linux-gnuabin32`.

llvm-svn: 344603
2018-10-16 10:19:06 +00:00
Jonas Hahnfeld fb8ca8a1ec Fix greedy FileCheck expression in test/Driver/mips-abi.c
'ld{{.*}}"' seems to match the complete line for me which is failing
the test. Only allow an optional '.exe' for Windows systems as most
other tests do.
Another possibility would be to collapse the greedy expression with
the next check to avoid matching the full line.

Differential Revision: https://reviews.llvm.org/D52619

llvm-svn: 343240
2018-09-27 17:27:48 +00:00
Simon Atanasyan 0c0fb4b765 [driver][mips] Adjust target triple accordingly to provided ABI name
Explicitly selected MIPS ABI using the `-mabi` option implies
corresponding target triple. For 'O32' ABI it's a 32-bit target triple
like `mips-linux-gnu`. For 'N32' and 'N64' ABIs it's a 64-bit target
triple like `mips64-linux-gnu`. This patch adjusts target triple
accordingly these rules like we do for pseudo-target flags '-m64',
'-m32' etc already.

Differential revision: https://reviews.llvm.org/D52290

llvm-svn: 343169
2018-09-27 05:04:50 +00:00
Simon Dardis 16bddf21cf [mips] Add missing mips-registered-target to mips test.
llvm-svn: 310715
2017-08-11 15:23:23 +00:00
Daniel Sanders 32b2d6b160 [mips] Defer validity check for CPU/ABI pairs and improve error message for invalid cases.
Summary:
The validity of ABI/CPU pairs is no longer checked on the fly but is
instead checked after initialization. As a result, invalid CPU/ABI pairs
can be reported as being known but invalid instead of being unknown. For
example, we now emit:
  error: ABI 'n32' is not supported on CPU 'mips32r2'
instead of:
  error: unknown target ABI 'n64'

Reviewers: atanasyan

Subscribers: sdardis, cfe-commits

Differential Revision: http://reviews.llvm.org/D21023

llvm-svn: 272645
2016-06-14 08:58:50 +00:00
Daniel Sanders 0ca86fe84d [mips] The default ABI depends on the CPU not the Arch on MTI and IMG vendor triples.
Summary:
32-bit CPU's default to O32. 64-bit CPU's default to N64. The default CPU
(mips32r2/mips64r2) still depends on the arch so there's no functional
change when the CPU isn't specified but commands like:
  clang -target mips-mti-linux-gnu -mips64r2
will now default to a 64-bit ABI like our gcc toolchains do* instead of
asserting in the backend**.

Other vendors (including Triple::UnknownVendor) still derive the default
ABI from the arch.

* Although not the same one as our gcc toolchains, clang has historically
  defaulted to N64 where gcc defaults to N32.
** Mixing O32 and a 64-bit CPU causing assertions is a long-standing bug.

Reviewers: atanasyan

Subscribers: sdardis, cfe-commits

Differential Revision: http://reviews.llvm.org/D21016

llvm-svn: 271884
2016-06-06 12:02:21 +00:00
Daniel Sanders 28d8637e25 [mips] The P5600 does not support N32/N64 since it's a 32-bit CPU.
Summary:

Reviewers: atanasyan

Subscribers: cfe-commits, sdardis

Differential Revision: http://reviews.llvm.org/D20963

llvm-svn: 271877
2016-06-06 09:47:32 +00:00
Daniel Sanders 07c8654284 [mips] Kill 'support' for untested EABI.
Summary:
There are no llvm backend tests* for EABI and no EABI buildbots. There were only
three clang tests, all of which checked that -mabi=eabi was passed to the
assembler.

*There is a single backend test that specifies EABI but it actually tests MIPS16.

Reviewers: atanasyan

Subscribers: emaste, sdardis, atanasyan, cfe-commits

Differential Revision: http://reviews.llvm.org/D20679

llvm-svn: 270998
2016-05-27 14:30:23 +00:00
Daniel Sanders ff9525817b [mips][p5600] Add -mcpu=p5600 option.
Summary:

Reviewers: vkalintiris, atanasyan

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12234

llvm-svn: 249306
2015-10-05 12:24:30 +00:00
Simon Atanasyan 4e16a4250d [Driver][Mips] Support one more MIPS CPU name - octeon.
llvm-svn: 212339
2014-07-04 12:37:04 +00:00
Simon Atanasyan 26610c5960 [Driver][Mips] Support more MIPS CPU names: mips1 - mips5.
llvm-svn: 212338
2014-07-04 12:36:56 +00:00
Simon Atanasyan 6b3544eb1d [Driver][Mips] Check MIPS CPU name provided to the Clang driver.
llvm-svn: 212260
2014-07-03 08:31:23 +00:00
Simon Atanasyan a42a84e44c [Driver][Mips] If ABI name is not provided deduce it from the target triple
not from the CPU name. This approach is closer to the method used by gcc driver.

llvm-svn: 212176
2014-07-02 13:20:36 +00:00
Simon Atanasyan 08c165ba37 [Driver][Mips] Check rejecting of invalid MIPS ABI names in the test.
No functional changes.

llvm-svn: 212022
2014-06-30 08:09:54 +00:00
Simon Atanasyan 4938ddb1ab [Mips] Convert a GNU style Mips ABI name to the name accepted by LLVM
Mips backend.

llvm-svn: 179981
2013-04-21 13:30:10 +00:00