1 //===- MBlazeCallingConv.td - Calling Conventions for MBlaze ----*- C++ -*-===//
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], CCAssignToReg<[R3, R4]>>,
24 // f32 are returned in registers F3, F4
25 CCIfType<[f32], CCAssignToReg<[F3, F4]>>