brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · aec109b Raw
40 lines · plain
1//===- XCoreCallingConv.td - Calling Conventions for XCore -*- tablegen -*-===//2//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-exception6//7//===----------------------------------------------------------------------===//8// This describes the calling conventions for XCore architecture.9//===----------------------------------------------------------------------===//10 11//===----------------------------------------------------------------------===//12// XCore Return Value Calling Convention13//===----------------------------------------------------------------------===//14def RetCC_XCore : CallingConv<[15  // i32 are returned in registers R0, R1, R2, R316  CCIfType<[i32], CCAssignToReg<[R0, R1, R2, R3]>>,17 18  // Integer values get stored in stack slots that are 4 bytes in19  // size and 4-byte aligned.20  CCIfType<[i32], CCAssignToStack<4, 4>>21]>;22 23//===----------------------------------------------------------------------===//24// XCore Argument Calling Conventions25//===----------------------------------------------------------------------===//26def CC_XCore : CallingConv<[27  // Promote i8/i16 arguments to i32.28  CCIfType<[i8, i16], CCPromoteToType<i32>>,29 30  // The 'nest' parameter, if any, is passed in R11.31  CCIfNest<CCAssignToReg<[R11]>>,32 33  // The first 4 integer arguments are passed in integer registers.34  CCIfType<[i32], CCAssignToReg<[R0, R1, R2, R3]>>,35 36  // Integer values get stored in stack slots that are 4 bytes in37  // size and 4-byte aligned.38  CCIfType<[i32], CCAssignToStack<4, 4>>39]>;40