[PATCH] D62003: Add TargetLoweringInfo hook for explicitly setting the ABI calling convention endianess

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 05:06:16 PDT 2019


dylanmckay created this revision.
dylanmckay added reviewers: bogner, t.p.northover, RKSimon, niravd.
Herald added a subscriber: JDevlieghere.
Herald added a project: LLVM.

The endianess used in the calling convention does not always match the
endianess of the target on all architectures, namely AVR.

When an argument is too large to be legalised by the architecture and is
split for the ABI, a new hook TargetLoweringInfo::shouldSplitFunctionArgumentsAsLittleEndian
is queried to find the endianess that function arguments must be laid
out in.

This approach was recommended by Eli Friedman.

Originally reported in https://github.com/avr-rust/rust/issues/129.

Patch by Carl Peto.


Repository:
  rL LLVM

https://reviews.llvm.org/D62003

Files:
  include/llvm/CodeGen/TargetLowering.h
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/Target/AVR/AVRISelLowering.h
  test/CodeGen/AVR/umul.with.overflow.i16-bug.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62003.199792.patch
Type: text/x-patch
Size: 3790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190516/d5ce6435/attachment.bin>


More information about the llvm-commits mailing list