pspsdk-1.0+beta2
pspkernel.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * pspkernel.h - Main include file that includes all major kernel headers.
7  *
8  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11  *
12  * $Id: pspkernel.h 1207 2005-10-23 05:50:29Z mrbrown $
13  */
14 
15 #ifndef PSPKERNEL_H
16 #define PSPKERNEL_H
17 
18 #include <pspuser.h>
19 #include <pspiofilemgr_kernel.h>
20 #include <psploadcore.h>
21 #include <pspstdio_kernel.h>
22 #include <pspsysreg.h>
23 #include <pspkdebug.h>
24 #include <pspintrman_kernel.h>
25 #include <pspmodulemgr_kernel.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
38 #define pspKernelSetKernelPC() \
39 { \
40  __asm__ volatile ( \
41  "la $8, 1f\n\t" \
42  "lui $9, 0x8000\n\t" \
43  "or $8, $9\n\t" \
44  "jr $8\n\t" \
45  " nop\n\t" \
46  "1:\n\t" \
47  : : : "$8", "$9"); \
48  sceKernelIcacheClearAll(); \
49 }
50 
55 #define pspKernelSetUserPC() \
56 { \
57  __asm__ volatile ( \
58  "la $8, 1f\n\t" \
59  "li $9, 0x7FFFFFFF\n\t" \
60  "and $8, $9\n\t" \
61  "jr $8\n\t" \
62  " nop\n\t" \
63  "1:\n\t" \
64  : : : "$8", "$9"); \
65  sceKernelIcacheClearAll(); \
66 }
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* PSPKERNEL_H */