-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathI8080CallingConv.td
43 lines (36 loc) · 1.69 KB
/
I8080CallingConv.td
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//===- I8080CallingConv.td - Calling Conventions for I8080 -*- 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 I8080 architecture.
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// I8080 Return Value Calling Convention
//===----------------------------------------------------------------------===//
// def RetCC_I8080 : CallingConv<[
// // i32 are returned in registers v0
// CCIfType<[i32], CCAssignToReg<[v0]>>,
// // Integer values get stored in stack slots that are 4 bytes in
// // size and 4-byte aligned.
// CCIfType<[i32], CCAssignToStack<4, 4>>
// ]>;
//===----------------------------------------------------------------------===//
// I8080 Argument Calling Conventions
//===----------------------------------------------------------------------===//
// def CC_I8080 : CallingConv<[
// // Promote i8 arguments to i32.
// CCIfType<[i8], CCPromoteToType<i32>>,
// // Promote i16 arguments to i32.
// CCIfType<[i16], CCPromoteToType<i32>>,
// // The first 5 integer arguments are passed in integer registers.
// CCIfType<[i32], CCAssignToReg<[a0, a1, a2]>>,
// // Integer values get stored in stack slots that are 4 bytes in
// // size and 4-byte aligned.
// CCIfType<[i32], CCAssignToStack<4, 4>>
// ]>;
// def CC_Save : CalleeSavedRegs<(add s0, s1, s2, sp, fp, ra)>;
// Should there be only R7 here?