summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2016-10-08 01:05:09 +0000
committerDylan McKay <dylanmckay34@gmail.com>2016-10-08 01:05:09 +0000
commit12109e731472735c2361744c9ca1059389d26978 (patch)
tree7d81313f56c38f542ab868234b5ee2259bed729d
parentc1ff65cf62635fedb69fd360d9e292c03004c490 (diff)
downloadbcm5719-llvm-12109e731472735c2361744c9ca1059389d26978.tar.gz
bcm5719-llvm-12109e731472735c2361744c9ca1059389d26978.zip
Allow a maximum of 64 bits to be returned in registers
The rest spills to the stack Authored by Jake Goulding llvm-svn: 283635
-rw-r--r--llvm/lib/Target/AVR/AVRISelLowering.h8
-rw-r--r--llvm/test/CodeGen/AVR/large-return-size.ll9
2 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/Target/AVR/AVRISelLowering.h b/llvm/lib/Target/AVR/AVRISelLowering.h
index 69aaaf2db21..836ce802255 100644
--- a/llvm/lib/Target/AVR/AVRISelLowering.h
+++ b/llvm/lib/Target/AVR/AVRISelLowering.h
@@ -15,6 +15,7 @@
#ifndef LLVM_AVR_ISEL_LOWERING_H
#define LLVM_AVR_ISEL_LOWERING_H
+#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/Target/TargetLowering.h"
namespace llvm {
@@ -128,6 +129,13 @@ private:
SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const;
SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG) const;
+ CCAssignFn *CCAssignFnForReturn(CallingConv::ID CC) const;
+
+ bool CanLowerReturn(CallingConv::ID CallConv,
+ MachineFunction &MF, bool isVarArg,
+ const SmallVectorImpl<ISD::OutputArg> &Outs,
+ LLVMContext &Context) const override;
+
SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
const SmallVectorImpl<ISD::OutputArg> &Outs,
const SmallVectorImpl<SDValue> &OutVals, const SDLoc &dl,
diff --git a/llvm/test/CodeGen/AVR/large-return-size.ll b/llvm/test/CodeGen/AVR/large-return-size.ll
new file mode 100644
index 00000000000..5f51fa1079e
--- /dev/null
+++ b/llvm/test/CodeGen/AVR/large-return-size.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -march=avr | FileCheck %s
+define void @call_more_than_64_bits() {
+; CHECK-LABEL: call_more_than_64_bits
+entry-block:
+ %foo = call { i64, i1 } @more_than_64_bits()
+ ret void
+}
+
+declare { i64, i1 } @more_than_64_bits()
OpenPOWER on IntegriCloud