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