CACAO
Data Structures | Macros | Typedefs | Functions
executionstate.hpp File Reference

Go to the source code of this file.

Data Structures

struct  executionstate_t
 

Macros

#define SIZE_OF_STACKSLOT   8
 
#define STACK_SLOTS_PER_FLOAT   1
 

Typedefs

typedef uint64_t stackslot_t
 

Functions

void executionstate_pop_stackframe (executionstate_t *es)
 Restore callee-saved registers (including the RA register), set the stack pointer to the next stackframe, set the PC to the return address of the popped frame. More...
 
void executionstate_unwind_exception (executionstate_t *es, java_handle_t *e)
 Performs stack unwinding in case of an exception. More...
 
void executionstate_sanity_check (void *context)
 
void executionstate_println (executionstate_t *es)
 
void md_executionstate_read (executionstate_t *es, void *ucontext)
 Read the given context into an executionstate. More...
 
void md_executionstate_write (executionstate_t *es, void *ucontext)
 Write the given executionstate back to the context. More...
 

Macro Definition Documentation

#define SIZE_OF_STACKSLOT   8

Definition at line 40 of file executionstate.hpp.

#define STACK_SLOTS_PER_FLOAT   1

Definition at line 41 of file executionstate.hpp.

Typedef Documentation

typedef uint64_t stackslot_t

Definition at line 42 of file executionstate.hpp.

Function Documentation

void executionstate_pop_stackframe ( executionstate_t es)

Restore callee-saved registers (including the RA register), set the stack pointer to the next stackframe, set the PC to the return address of the popped frame.

*** This function imitates the effects of the method epilog *** *** and returning from the method call. ***

Parameters
esExecution state to be modified. NOTE: es->code and es->pv are NOT updated.

Definition at line 52 of file executionstate.cpp.

void executionstate_println ( executionstate_t es)

Definition at line 306 of file executionstate.cpp.

void executionstate_sanity_check ( void context)

Definition at line 219 of file executionstate.cpp.

void executionstate_unwind_exception ( executionstate_t es,
java_handle_t e 
)

Performs stack unwinding in case of an exception.

This is done by popping frames off the given execution state until a frame is reached for which there is a handler. Execution will continue at the handler site once the execution state is written back to the machine.

Parameters
esExecution state to be modified.
eThe thrown exception object.

This is specified in: The Java(TM) Virtual Machine Specification, Second Edition Section 3.6.5: Abrupt Method Invocation Completion

Definition at line 175 of file executionstate.cpp.

void md_executionstate_read ( executionstate_t es,
void context 
)

Read the given context into an executionstate.

Parameters
esexecution state
contextmachine context

Definition at line 107 of file md-os.cpp.

void md_executionstate_write ( executionstate_t es,
void context 
)

Write the given executionstate back to the context.

Parameters
esexecution state
contextmachine context

Definition at line 148 of file md-os.cpp.