This is an archive of the discontinued LLVM Phabricator instance.

[mips] The default ABI depends on the CPU not the Arch on MTI and IMG vendor triples.
ClosedPublic

Authored by dsanders on Jun 6 2016, 3:32 AM.

Details

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.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 59701.Jun 6 2016, 3:32 AM
dsanders retitled this revision from to [mips] The default ABI depends on the CPU not the Arch on MTI and IMG vendor triples..
dsanders updated this object.
dsanders added a reviewer: atanasyan.
dsanders added a subscriber: cfe-commits.
atanasyan accepted this revision.Jun 6 2016, 4:50 AM
atanasyan edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 6 2016, 4:50 AM
dsanders closed this revision.Jun 6 2016, 5:08 AM