Files
mk64/src/os/__osSpSetPc.c
T
coco875 17a6f4bb3d update clang and add action (#664)
* update clang and add action

* try clang on course folder only

* forget two file

* Update course_displaylists.inc.c

* forget few other file

* Update course_vertices.inc.c

* format all code while get it match

* second pass

* format other dir

* disable clang format on bad ido code

* fix some tabulation

* revert format on tool dir

* Update clang-format.yml

* ignore gbi.h

* add some read me instruction

* fix error

* format and fixing error

* Update README.md

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2024-08-24 15:27:53 -06:00

13 lines
270 B
C

#include "libultra_internal.h"
#include "hardware.h"
s32 __osSpSetPc(void* pc) {
register u32 status = HW_REG(SP_STATUS_REG, u32);
if (!(status & SPSTATUS_HALT)) {
return -1;
} else {
HW_REG(SP_PC_REG, void*) = pc;
return 0;
}
}