Home | History | Annotate | Download | only in Alpha
      1 //===- AlphaCallingConv.td - Calling Conventions for Alpha -*- 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 Alpha architecture.
     10 //===----------------------------------------------------------------------===//
     11 
     12 //===----------------------------------------------------------------------===//
     13 // Alpha Return Value Calling Convention
     14 //===----------------------------------------------------------------------===//
     15 def RetCC_Alpha : CallingConv<[
     16   // i64 is returned in register R0
     17   // R1 is an llvm extension, I don't know what gcc does
     18   CCIfType<[i64], CCAssignToReg<[R0,R1]>>,
     19 
     20   // f32 / f64 are returned in F0/F1
     21   CCIfType<[f32, f64], CCAssignToReg<[F0, F1]>>
     22 ]>;
     23 
     24 //===----------------------------------------------------------------------===//
     25 // Alpha Argument Calling Conventions
     26 //===----------------------------------------------------------------------===//
     27 def CC_Alpha : CallingConv<[
     28   // The first 6 arguments are passed in registers, whether integer or
     29   // floating-point
     30   CCIfType<[i64], CCAssignToRegWithShadow<[R16, R17, R18, R19, R20, R21],
     31                                           [F16, F17, F18, F19, F20, F21]>>,
     32 
     33   CCIfType<[f32, f64], CCAssignToRegWithShadow<[F16, F17, F18, F19, F20, F21],
     34                                                [R16, R17, R18, R19, R20, R21]>>,
     35 
     36   // Stack slots are 8 bytes in size and 8-byte aligned.
     37   CCIfType<[i64, f32, f64], CCAssignToStack<8, 8>>
     38 ]>;
     39