PSPSDK 2024-10-31
Loading...
Searching...
No Matches
pspkernel.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
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 */
13
14#ifndef PSPKERNEL_H
15#define PSPKERNEL_H
16
17#include <pspuser.h>
18#include <pspiofilemgr_kernel.h>
19#include <psploadcore.h>
20#include <pspstdio_kernel.h>
21#include <pspsysreg.h>
22#include <pspkdebug.h>
23#include <pspintrman_kernel.h>
24#include <pspmodulemgr_kernel.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
37#define pspKernelSetKernelPC() \
38{ \
39 __asm__ volatile ( \
40 "la $8, 1f\n\t" \
41 "lui $9, 0x8000\n\t" \
42 "or $8, $9\n\t" \
43 "jr $8\n\t" \
44 " nop\n\t" \
45 "1:\n\t" \
46 : : : "$8", "$9"); \
47 sceKernelIcacheClearAll(); \
48}
49
54#define pspKernelSetUserPC() \
55{ \
56 __asm__ volatile ( \
57 "la $8, 1f\n\t" \
58 "li $9, 0x7FFFFFFF\n\t" \
59 "and $8, $9\n\t" \
60 "jr $8\n\t" \
61 " nop\n\t" \
62 "1:\n\t" \
63 : : : "$8", "$9"); \
64 sceKernelIcacheClearAll(); \
65}
66
67#ifdef __cplusplus
68}
69#endif
70
71#endif /* PSPKERNEL_H */