[PATCH] D59592: support ilp32e Calling Convention

Daliang Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 01:12:22 PDT 2019


xudaliang.pku created this revision.
xudaliang.pku added a reviewer: asb.
Herald added subscribers: llvm-commits, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar.
Herald added a project: LLVM.

This patch adds ilp32e Calling Convention support by using -target-abi=ilp32e. It is decoupled with rv32e arch. You can use -march=rv32i -target-abi=ilp32e.
This patch support for :

1. stack align = 4
2. only use a0-a5 argument register
3. callee saved register s0-s1

according to

  https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#rv32e-calling-convention


Repository:
  rL LLVM

https://reviews.llvm.org/D59592

Files:
  lib/Target/RISCV/RISCVCallingConv.td
  lib/Target/RISCV/RISCVFrameLowering.cpp
  lib/Target/RISCV/RISCVFrameLowering.h
  lib/Target/RISCV/RISCVISelLowering.cpp
  lib/Target/RISCV/RISCVRegisterInfo.cpp
  test/CodeGen/RISCV/callee-saved-gprs-ilp32e.ll
  test/CodeGen/RISCV/calling-conv-ilp32e.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59592.191459.patch
Type: text/x-patch
Size: 18248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190320/b0da6c11/attachment.bin>


More information about the llvm-commits mailing list