mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-23 13:56:06 +00:00

This patch adds support for struct return values to the MSP430 target backend. It also reverses the order of argument and return registers in the calling convention to bring it into closer alignment with the published EABI from TI. Patch by Andrew Wygle (awygle). Differential Revision: https://reviews.llvm.org/D29069 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296807 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
575 B
LLVM
24 lines
575 B
LLVM
; RUN: llc < %s | FileCheck %s
|
|
|
|
target datalayout = "e-p:16:16:16-i8:8:8-i16:16:16-i32:16:32-n8:16"
|
|
target triple = "msp430---elf"
|
|
|
|
; Allow simple structures to be returned by value.
|
|
|
|
%s = type { i64, i64 }
|
|
|
|
define %s @fred() #0 {
|
|
; CHECK-LABEL: fred:
|
|
; CHECK: mov.w #2314, 14(r12)
|
|
; CHECK: mov.w #2828, 12(r12)
|
|
; CHECK: mov.w #3342, 10(r12)
|
|
; CHECK: mov.w #3840, 8(r12)
|
|
; CHECK: mov.w #258, 6(r12)
|
|
; CHECK: mov.w #772, 4(r12)
|
|
; CHECK: mov.w #1286, 2(r12)
|
|
; CHECK: mov.w #1800, 0(r12)
|
|
ret %s {i64 72623859790382856, i64 651345242494996224}
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|