brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 098e03e Raw
41 lines · plain
1//===- ARCCallingConv.td - Calling Conventions for ARC -----*- 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 ARC architecture.9//===----------------------------------------------------------------------===//10 11//===----------------------------------------------------------------------===//12// ARC Return Value Calling Convention13//===----------------------------------------------------------------------===//14def RetCC_ARC : CallingConv<[15  // i32 are returned in registers R0, R1, R2, R316  CCIfType<[i32, i64], 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<[i64], CCAssignToStack<8, 4>>,21  CCIfType<[i32], CCAssignToStack<4, 4>>22]>;23 24//===----------------------------------------------------------------------===//25// ARC Argument Calling Conventions26//===----------------------------------------------------------------------===//27def CC_ARC : CallingConv<[28  // Promote i8/i16 arguments to i32.29  CCIfType<[i8, i16], CCPromoteToType<i32>>,30 31  // The first 8 integer arguments are passed in integer registers.32  CCIfType<[i32, i64], CCAssignToReg<[R0, R1, R2, R3, R4, R5, R6, R7]>>,33 34  // Integer values get stored in stack slots that are 4 bytes in35  // size and 4-byte aligned.36  CCIfType<[i64], CCAssignToStack<8, 4>>,37  CCIfType<[i32], CCAssignToStack<4, 4>>38]>;39 40def CSR_ARC : CalleeSavedRegs<(add (sequence "R%u", 13, 25), GP, FP)>;41