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