[PATCH] D59357: [RISCV] Add codegen support for ilp32f, ilp32d, lp64f, and lp64d ("hard float") ABIs

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 04:39:07 PDT 2019


asb created this revision.
asb added reviewers: apazos, rogfer01, shiva0217, kito-cheng.
Herald added subscribers: jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar.
Herald added a project: LLVM.

This patch adds support for the RISC-V hard float ABIs, building on top of rL355771 <https://reviews.llvm.org/rL355771>, which added basic target-abi parsing and MC layer support. It also builds on some re-organisations and expansion of the upstream ABI and calling convention tests which were recently committed directly upstream.

A number of aspects of the RISC-V float hard float ABIs require frontend support (e.g. flattening of structs and passing int+fp for fp+fp structs in a pair of registers), and will be addressed in a Clang patch.

As can be seen from the tests, it would be worthwhile extending RISCVMergeBaseOffsets to handle constant pool as well as global accesses.


Repository:
  rL LLVM

https://reviews.llvm.org/D59357

Files:
  lib/Target/RISCV/RISCVCallingConv.td
  lib/Target/RISCV/RISCVISelLowering.cpp
  lib/Target/RISCV/RISCVRegisterInfo.cpp
  test/CodeGen/RISCV/callee-saved-fpr32s.ll
  test/CodeGen/RISCV/callee-saved-fpr64s.ll
  test/CodeGen/RISCV/callee-saved-gprs.ll
  test/CodeGen/RISCV/calling-conv-ilp32-ilp32f-common.ll
  test/CodeGen/RISCV/calling-conv-ilp32-ilp32f-ilp32d-common.ll
  test/CodeGen/RISCV/calling-conv-ilp32d.ll
  test/CodeGen/RISCV/calling-conv-ilp32f-ilp32d-common.ll
  test/CodeGen/RISCV/calling-conv-lp64-lp64f-common.ll
  test/CodeGen/RISCV/calling-conv-lp64-lp64f-lp64d-common.ll
  test/CodeGen/RISCV/target-abi-valid.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59357.190601.patch
Type: text/x-patch
Size: 48839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190314/57fff5ec/attachment.bin>


More information about the llvm-commits mailing list