]> granicus.if.org Git - clang/commit
[mips] The default ABI depends on the CPU not the Arch on MTI and IMG vendor triples.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 6 Jun 2016 12:02:21 +0000 (12:02 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 6 Jun 2016 12:02:21 +0000 (12:02 +0000)
commit8cab059d7933247f0f161e3173d2660aa1fccbb4
treed9e6c51a08e84c5982808a37fa83797e0cfeaebf
parente74555119f9f836f02df9133d0accd950610ab8a
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271884 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Tools.cpp
test/Driver/mips-abi.c