Nugget
Loading...
Searching...
No Matches
Functions | Variables
cester-cop0.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 CESTER_BODY (static int s_got40;static int s_got80;static uint32_t s_cause;static uint32_t s_epc;static uint32_t s_from;static uint32_t *s_resume;static uint32_t *s_regs;static uint32_t(*s_customhandler)()=NULL;static uint32_t s_oldIMASK;static uint32_t s_oldDPCR;static uint32_t s_oldDICR;uint32_t handler(uint32_t *regs, uint32_t from) { if(from==0x40) s_got40=1;if(from==0x80) s_got80=1;uint32_t cause;uint32_t epc;s_from=from;asm("mfc0 %0, $13\nnop\nmfc0 %1, $14\nnop" :"=r"(cause), "=r"(epc));s_cause=cause;s_epc=epc;if(s_customhandler) { return s_customhandler();} else { return s_resume ?((uint32_t) s_resume) :(epc+4);} } void installExceptionHandlers(uint32_t(*handler)(uint32_t *regs, uint32_t from));void uninstallExceptionHandlers();uint32_t branchbranch1();uint32_t branchbranch2();uint32_t jumpjump1();uint32_t jumpjump2();uint32_t cpu_LWR_LWL_half(uint32_t buff[], uint32_t initial);uint32_t cpu_LWR_LWL_nodelay(uint32_t buff[], uint32_t initial);uint32_t cpu_LWR_LWL_delayed(uint32_t buff[], uint32_t initial);uint32_t cpu_LWR_LWL_load_different(uint32_t buff[], uint32_t initial);uint32_t cpu_LW_LWR(uint32_t buff[], uint32_t initial);uint32_t cpu_delayed_load(uint32_t buff[], uint32_t override);uint32_t cpu_delayed_load_cancelled(uint32_t buff[], uint32_t override);uint64_t cpu_delayed_load_load(uint32_t buff[], uint32_t override);uint32_t linkandload();uint32_t lwandlink();uint32_t nolink();static int s_interruptsWereEnabled;) CESTER_BEFORE_EACH(cpu_tests
 
 for (unsigned i=0;i< 7;i++)
 

Variables

 testname
 
 testindex
 
 s_oldIMASK = IMASK
 
 s_oldDPCR = DPCR
 
 s_oldDICR = DICR
 
 IMASK = 0
 
 IREG = 0
 
 DPCR = 0
 
uint32_t dicr = DICR
 
 DICR = dicr
 
 s_got40 = 0
 
 s_got80 = 0
 
 s_cause = 0
 
 s_epc = 0
 
 s_from = 0
 
 s_resume = NULL
 
 s_regs = NULL
 
 s_customhandler = NULL
 

Function Documentation

◆ CESTER_BODY()

CESTER_BODY ( static int s_got40;static int s_got80;static uint32_t s_cause;static uint32_t s_epc;static uint32_t s_from;static uint32_t *s_resume;static uint32_t *s_regs;static uint32_t(*)()  s_customhandler = NULL; static uint32_t s_oldIMASK; static uint32_t s_oldDPCR; static uint32_t s_oldDICRuint32_t handler(uint32_t * regs, uint32_t from) { if (from == 0x40) s_got40 = 1; if (from == 0x80) s_got80 = 1; uint32_t cause; uint32_t epc; s_from = from; asm("mfc0 %0, $13\nnop\nmfc0 %1, $14\nnop" : "=r"(cause), "=r"(epc)); s_cause = cause; s_epc = epc; if (s_customhandler) { return s_customhandler(); } else { return s_resume ? ((uint32_t)s_resume) : (epc + 4); } } void installExceptionHandlers(uint32_t (*handler)(uint32_t * regs, uint32_t from)); void uninstallExceptionHandlers(); uint32_t branchbranch1(); uint32_t branchbranch2(); uint32_t jumpjump1(); uint32_t jumpjump2(); uint32_t cpu_LWR_LWL_half(uint32_t buff[], uint32_t initial); uint32_t cpu_LWR_LWL_nodelay(uint32_t buff[], uint32_t initial); uint32_t cpu_LWR_LWL_delayed(uint32_t buff[], uint32_t initial); uint32_t cpu_LWR_LWL_load_different(uint32_t buff[], uint32_t initial); uint32_t cpu_LW_LWR(uint32_t buff[], uint32_t initial); uint32_t cpu_delayed_load(uint32_t buff[], uint32_t override); uint32_t cpu_delayed_load_cancelled(uint32_t buff[], uint32_t override); uint64_t cpu_delayed_load_load(uint32_t buff[], uint32_t override); uint32_t linkandload(); uint32_t lwandlink(); uint32_t nolink(); static int s_interruptsWereEnabled;)

◆ for()

for ( )

Variable Documentation

◆ dicr

uint32_t dicr = DICR

◆ DICR

DICR = dicr

◆ DPCR

DPCR = 0

◆ IMASK

IMASK = 0

◆ IREG

IREG = 0

◆ s_cause

s_cause = 0

◆ s_customhandler

s_customhandler = NULL

◆ s_epc

s_epc = 0

◆ s_from

s_from = 0

◆ s_got40

s_got40 = 0

◆ s_got80

s_got80 = 0

◆ s_oldDICR

s_oldDICR = DICR

◆ s_oldDPCR

s_oldDPCR = DPCR

◆ s_oldIMASK

s_oldIMASK = IMASK

◆ s_regs

s_regs = NULL

◆ s_resume

s_resume = NULL

◆ testindex

testindex

◆ testname

testname