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