]> granicus.if.org Git - llvm/commit
Add TargetLoweringInfo hook for explicitly setting the ABI calling convention endianess
authorDylan McKay <me@dylanmckay.io>
Tue, 21 May 2019 06:38:02 +0000 (06:38 +0000)
committerDylan McKay <me@dylanmckay.io>
Tue, 21 May 2019 06:38:02 +0000 (06:38 +0000)
commitced1284d689e61e73794a0ec6abc359746be229d
tree8b00ef6e45951eb740faf1a29766ad9a010c8333
parenta89c4a773efef1dd3512d0cd6465f383cfe48dcf
Add TargetLoweringInfo hook for explicitly setting the ABI calling convention endianess

Summary:
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.

Reviewers: bogner, t.p.northover, RKSimon, niravd, efriedma

Reviewed By: efriedma

Subscribers: JDevlieghere, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361222 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/TargetLowering.h
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/AVR/AVRISelLowering.h
test/CodeGen/AVR/umul.with.overflow.i16-bug.ll [new file with mode: 0644]