[PATCH] D136413: [Clang][LoongArch] Define more LoongArch specific built-in macros

Lu Weining via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 19:41:11 PDT 2022


SixWeining added a comment.

In D136413#3873216 <https://reviews.llvm.org/D136413#3873216>, @xry111 wrote:

> Do we support `--target=loongarch64 -mabi=ilp32d` or `-mfpu=64 -mabi=lp64s` combinations now?  If true I think we'll need test cases for such combinations.

For `--target=loongarch64 -mabi=ilp32d`, I'm not sure about this. The ABI document doesn't clearly describe this. But in current llvm implementation, it is NOT supported. In `clang/lib/Basic/Targets/LoongArch.h:LoongArch64TargetInfo:setABI`:

  bool setABI(const std::string &Name) override {
    if (Name == "lp64d" || Name == "lp64f" || Name == "lp64s") {
      ABI = Name;
      return true;
    }
    return false;
  }

For `-mfpu=64 -mabi=lp64s`, I think it is valid and I will add some tests. Similarly, `-mfpu=32 -mabi=lp64s`.

How about `-mfpu=64 -mabi=lp64f`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136413/new/

https://reviews.llvm.org/D136413



More information about the cfe-commits mailing list