This is an archive of the discontinued LLVM Phabricator instance.

[clang][RISCV] Change implicit ARCH for explicitly specified ABI
AbandonedPublic

Authored by benshi001 on Jun 12 2021, 11:38 PM.

Details

Summary

As discussed in
https://github.com/riscv/riscv-toolchain-conventions/issues/13,

the implicit ARCH for explicitly specified ABI should be

ilp32e => rv32e
ilp32 => rv32imac
ilp32f => rv32imacf
ilp32d => rv32imacfd
lp64 => rv64imac
lp64f => rv64imacf
lp64d => rv64imacfd

Diff Detail

Event Timeline

benshi001 created this revision.Jun 12 2021, 11:38 PM
benshi001 requested review of this revision.Jun 12 2021, 11:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2021, 11:38 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MaskRay added a comment.EditedJun 13 2021, 10:27 AM

The thing looks weird. My mental model (ppc) is that -march can infer -mabi, not the other way around...

benshi001 added a comment.EditedJun 13 2021, 6:53 PM

The thing looks weird. My mental model (ppc) is that -march can infer -mabi, not the other way around...

The original way in Driver/Toolchains/Arch/RISCV.cpp is

if (MABI.equals_lower("ilp32e"))
  return "rv32e";
else if (MABI.startswith_lower("ilp32"))
  return "rv32imafdc";
else if (MABI.startswith_lower("lp64"))
  return "rv64imafdc";

So you think we should delete it entirely?

benshi001 abandoned this revision.Jun 28 2021, 11:18 PM