diff options
| author | Dylan McKay <me@dylanmckay.io> | 2019-05-21 06:38:02 +0000 |
|---|---|---|
| committer | Dylan McKay <me@dylanmckay.io> | 2019-05-21 06:38:02 +0000 |
| commit | e967308da43213c9c61696d77897f1d5dbc9eb94 (patch) | |
| tree | d57fd26b0121f8aae24ae1aa21ae5bb3ac0c43af /llvm/lib/Target | |
| parent | 690fa1b51beb7520b224ee4c9cb7c90d3bbe94e0 (diff) | |
| download | bcm5719-llvm-e967308da43213c9c61696d77897f1d5dbc9eb94.tar.gz bcm5719-llvm-e967308da43213c9c61696d77897f1d5dbc9eb94.zip | |
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
llvm-svn: 361222
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AVR/AVRISelLowering.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/AVR/AVRISelLowering.h b/llvm/lib/Target/AVR/AVRISelLowering.h index 7e4496324a1..ed2d0835903 100644 --- a/llvm/lib/Target/AVR/AVRISelLowering.h +++ b/llvm/lib/Target/AVR/AVRISelLowering.h @@ -128,6 +128,11 @@ public: unsigned getRegisterByName(const char* RegName, EVT VT, SelectionDAG &DAG) const override; + bool shouldSplitFunctionArgumentsAsLittleEndian(const DataLayout &DL) + const override { + return false; + } + private: SDValue getAVRCmp(SDValue LHS, SDValue RHS, ISD::CondCode CC, SDValue &AVRcc, SelectionDAG &DAG, SDLoc dl) const; |

