summaryrefslogtreecommitdiff
path: root/src/libultra/io/spsetpc.c
blob: dce0b5d247e92573cf0385c421a77b215444a386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "PR/rcp.h"

// TODO: this comes from a header
#ident "$Revision: 1.17 $"

s32 __osSpSetPc(u32 pc) {
    register u32 status = IO_READ(SP_STATUS_REG);

    if (!(status & SP_STATUS_HALT)) {
        return -1;
    }
    IO_WRITE(SP_PC_REG, pc);

    return 0;
}