• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===- MBlazeCallingConv.td - Calling Conventions for MBlaze -*- tablegen -*-=//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// This describes the calling conventions for MBlaze architecture.
10//===----------------------------------------------------------------------===//
11
12/// CCIfSubtarget - Match if the current subtarget has a feature F.
13class CCIfSubtarget<string F, CCAction A>:
14  CCIf<!strconcat("State.getTarget().getSubtarget<MBlazeSubtarget>().", F), A>;
15
16//===----------------------------------------------------------------------===//
17// MBlaze ABI Calling Convention
18//===----------------------------------------------------------------------===//
19
20def RetCC_MBlaze : CallingConv<[
21  // i32 are returned in registers R3, R4
22  CCIfType<[i32,f32], CCAssignToReg<[R3, R4]>>
23]>;
24
25def CC_MBlaze : CallingConv<[
26  CCIfType<[i32,f32], CCCustom<"CC_MBlaze_AssignReg">>,
27  CCIfType<[i32,f32], CCAssignToStack<4, 4>>
28]>;
29