[all-commits] [llvm/llvm-project] dfed05: [AIX] Allow vararg calls when all arguments reside...

jasonliudev via All-commits all-commits at lists.llvm.org
Fri Jan 10 09:34:09 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dfed052fb3ecef53bf01612ec3fc7df73c2134b7
      https://github.com/llvm/llvm-project/commit/dfed052fb3ecef53bf01612ec3fc7df73c2134b7
  Author: jasonliu <jasonliu.development at gmail.com>
  Date:   2020-01-10 (Fri, 10 Jan 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    A llvm/test/CodeGen/PowerPC/aix-cc-abi.ll
    A llvm/test/CodeGen/PowerPC/aix-cc-altivec.ll
    R llvm/test/CodeGen/PowerPC/aix_cc_abi.ll

  Log Message:
  -----------
  [AIX] Allow vararg calls when all arguments reside in registers

Summary:
This patch pushes the AIX vararg unimplemented error diagnostic later
and allows vararg calls so long as all the arguments can be passed in register.
This patch extends the AIX calling convention implementation to initialize
GPR(s) for vararg float arguments. On AIX, both GPR(s) and FPR are allocated
for floating point arguments. The GPR(s) are only initialized for vararg calls,
otherwise the callee is expected to retrieve the float argument in the FPR.

f64 in AIX PPC32 requires special handling in order to allocated and
initialize 2 GPRs. This is performed with bitcast, SRL, truncation to
initialize one GPR for the MSW and bitcast, truncations to initialize
the other GPR for the LSW.

A future patch will follow to add support for arguments passed on the stack.

Patch provided by: cebowleratibm

Reviewers: sfertile, ZarkoCA, hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D71013




More information about the All-commits mailing list