[PATCH] D81428: [ARM] Moving CMSE handling of half arguments and return to the backend

Lucas Prates via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 13:52:09 PDT 2020


pratlucas created this revision.
Herald added subscribers: llvm-commits, cfe-commits, danielkiss, hiraditya, kristof.beyls.
Herald added projects: clang, LLVM.
pratlucas added reviewers: chill, rjmccall, ostannard.
pratlucas added a parent revision: D75169: [ARM] Enforcing calling convention for half-precision FP arguments and returns for big-endian AArch32.

As half-precision floating point arguments and returns were previously
coerced to either float or int32 by clang's codegen, the CMSE handling
of those was also performed in clang's side by zeroing the unused MSBs
of the coercer values.

This patch moves this handling to the backend's calling convention
lowering, making sure the high bits of the registers used by
half-precision arguments and returns are zeroed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81428

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/test/CodeGen/cmse-clear-fp16.c
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/ARM/cmse-clear-float-hard.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81428.269344.patch
Type: text/x-patch
Size: 24897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200608/df275ca9/attachment-0001.bin>


More information about the cfe-commits mailing list