1 //===- XtensaCallingConv.td - Xtensa Calling Conventions -*- tablegen ---*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
8 // This describes the calling conventions for the Xtensa ABI.
9 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
12 // Xtensa return value calling convention
13 //===----------------------------------------------------------------------===//
14 def RetCC_Xtensa : CallingConv<[
15 // First two return values go in a2, a3, a4, a5
16 CCIfType<[i32], CCAssignToReg<[A2, A3, A4, A5]>>,
17 CCIfType<[i64], CCAssignToRegWithShadow<[A2, A4], [A3, A5]>>
20 //===----------------------------------------------------------------------===//
21 // Callee-saved register lists.
22 //===----------------------------------------------------------------------===//
24 def CSR_Xtensa : CalleeSavedRegs<(add A0, A12, A13, A14, A15)>;