PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
as_reg_compat.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
#ifndef __AS_REG_COMPAT_H__
17
#define __AS_REG_COMPAT_H__
18
19
#ifdef _IOP
20
#define ABI_EABI64
21
#endif
22
23
#if !defined(ABI_EABI64) && !defined(ABI_N32)
24
// No ABI defined
25
#error "Must define ABI_EABI64 or ABI_N32"
26
#endif
27
28
#if defined(ABI_EABI64) && defined(ABI_N32)
29
// Both ABI's defined
30
#error "Must define ABI_EABI64 or ABI_N32"
31
#endif
32
33
#define zero 0
// Hardware zero
34
#define at 1
// Assembler temporary Caller-saved
35
#define v0 2
// Function results Caller-saved
36
#define v1 3
// Function results Caller-saved
37
#define a0 4
// Subprogram arguments Caller-saved
38
#define a1 5
// Subprogram arguments Caller-saved
39
#define a2 6
// Subprogram arguments Caller-saved
40
#define a3 7
// Subprogram arguments Caller-saved
41
42
#ifdef ABI_EABI64
43
#define a4 INVALID_REG
44
#define a5 INVALID_REG
45
#define a6 INVALID_REG
46
#define a7 INVALID_REG
47
#define t0 8
// Temporaries Caller-saved <- watch out!
48
#define t1 9
// Temporaries Caller-saved <- watch out!
49
#define t2 10
// Temporaries Caller-saved <- watch out!
50
#define t3 11
// Temporaries Caller-saved <- watch out!
51
#define t4 12
// Temporaries Caller-saved
52
#define t5 13
// Temporaries Caller-saved
53
#define t6 14
// Temporaries Caller-saved
54
#define t7 15
// Temporaries Caller-saved
55
#endif
56
57
#ifdef ABI_N32
58
#define a4 8
// Subprogram arguments Caller-saved
59
#define a5 9
// Subprogram arguments Caller-saved
60
#define a6 10
// Subprogram arguments Caller-saved
61
#define a7 11
// Subprogram arguments Caller-saved
62
#define t0 12
// Temporaries Caller-saved <- watch out!
63
#define t1 13
// Temporaries Caller-saved <- watch out!
64
#define t2 14
// Temporaries Caller-saved <- watch out!
65
#define t3 15
// Temporaries Caller-saved <- watch out!
66
#define t4 INVALID_REG
67
#define t5 INVALID_REG
68
#define t6 INVALID_REG
69
#define t7 INVALID_REG
70
#endif
71
72
#define s0 16
// Saved Callee-saved
73
#define s1 17
// Saved Callee-saved
74
#define s2 18
// Saved Callee-saved
75
#define s3 19
// Saved Callee-saved
76
#define s4 20
// Saved Callee-saved
77
#define s5 21
// Saved Callee-saved
78
#define s6 22
// Saved Callee-saved
79
#define s7 23
// Saved Callee-saved
80
#define t8 24
// Temporary Caller-saved
81
#define t9 25
// Temporary Caller-saved
82
#define k0 26
// Reserved for kernel
83
#define k1 27
// Reserved for kernel
84
#define gp 28
// Global pointer Callee-saved
85
#define sp 29
// Stack pointer Callee-saved
86
#define fp 30
// Frame pointer Callee-saved
87
#define ra 31
// Return address Caller-saved
88
89
#endif
/* __AS_REG_COMPAT_H__ */
common
include
as_reg_compat.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8