[all-commits] [llvm/llvm-project] fcce25: [Clang][LoongArch] Pass "f" and "d" features to cc...

Lu Weining via All-commits all-commits at lists.llvm.org
Thu Oct 13 05:05:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fcce2562c177f0ad2aa03620be8675bef5c631d1
      https://github.com/llvm/llvm-project/commit/fcce2562c177f0ad2aa03620be8675bef5c631d1
  Author: Weining Lu <luweining at loongson.cn>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/Arch/LoongArch.cpp
    M clang/lib/Driver/ToolChains/Arch/LoongArch.h
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/Driver/loongarch-default-features.c

  Log Message:
  -----------
  [Clang][LoongArch] Pass "f" and "d" features to cc1 to enable hard float

On LoongArch, currently neither of "f" and "d" feature is passed from
clang driver to cc1 by default. This means the backend generates code
for soft float.

In order to run programs in current LoongArch machines (hard float
environment) this patch temporarily enables "f" and "d" features.

In future, we should conditionally turn on these features depend on
various clang options, e.g. -mdouble-float, -msingle-float,
-msoft-float and -mfpu.




More information about the All-commits mailing list