mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
6f66f0556c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75993 91177308-0d34-0410-b5e6-96231b3b80d8
38 lines
1.5 KiB
TableGen
38 lines
1.5 KiB
TableGen
//=- SystemZCallingConv.td - Calling Conventions for SystemZ -*- tablegen -*-=//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
// This describes the calling conventions for SystemZ architecture.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// SystemZ Return Value Calling Convention
|
|
//===----------------------------------------------------------------------===//
|
|
def RetCC_SystemZ : CallingConv<[
|
|
// Promote i8/i16/i32 arguments to i64.
|
|
CCIfType<[i8, i16, i32], CCPromoteToType<i64>>,
|
|
|
|
// i64 is returned in register R2
|
|
CCIfType<[i64], CCAssignToReg<[R2D]>>
|
|
]>;
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// SystemZ Argument Calling Conventions
|
|
//===----------------------------------------------------------------------===//
|
|
def CC_SystemZ : CallingConv<[
|
|
// Promote i8/i16/i32 arguments to i64.
|
|
CCIfType<[i8, i16, i32], CCPromoteToType<i64>>,
|
|
|
|
// The first 5 integer arguments of non-varargs functions are passed in
|
|
// integer registers.
|
|
CCIfType<[i64], CCAssignToReg<[R2D, R3D, R4D, R5D, R6D]>>,
|
|
|
|
// Integer values get stored in stack slots that are 8 bytes in
|
|
// size and 8-byte aligned.
|
|
CCIfType<[i64], CCAssignToStack<8, 8>>
|
|
]>;
|