LMMS
Loading...
Searching...
No Matches
glue_ppc.h File Reference

Go to the source code of this file.

Macros

#define GLUE_MAX_FPSTACK_SIZE   0
#define GLUE_MAX_JMPSIZE   30000
#define GLUE_JMP_SET_OFFSET(endOfInstruction, offset)
#define GLUE_MOV_PX_DIRECTVALUE_SIZE   8
#define GLUE_FUNC_ENTER_SIZE   8
#define GLUE_FUNC_LEAVE_SIZE   12
#define GLUE_POP_PX_SIZE   8
#define GLUE_SET_PX_FROM_P1_SIZE   4
#define GLUE_SET_PX_FROM_WTP_SIZE   sizeof(int)
#define GLUE_POP_FPSTACK_SIZE   0
#define GLUE_PUSH_VAL_AT_PX_TO_FPSTACK_SIZE   4
#define GLUE_POP_FPSTACK_TO_WTP_TO_PX_SIZE   (sizeof(GLUE_POP_FPSTACK_TO_WTP) + GLUE_SET_PX_FROM_WTP_SIZE)
#define GLUE_STORE_P1_TO_STACK_AT_OFFS_SIZE(x)
#define GLUE_MOVE_PX_STACKPTR_SIZE   4
#define GLUE_MOVE_STACK_SIZE   4

Functions

static void GLUE_MOV_PX_DIRECTVALUE_GEN (void *b, INT_PTR v, int wv)
static int GLUE_RESET_WTP (unsigned char *out, void *ptr)
static void GLUE_POP_PX (void *b, int wv)
static void GLUE_SET_PX_FROM_P1 (void *b, int wv)
static int GLUE_POP_VALUE_TO_ADDR (unsigned char *buf, void *destptr)
static int GLUE_COPY_VALUE_AT_P1_TO_PTR (unsigned char *buf, void *destptr)
static void GLUE_CALL_CODE (INT_PTR bp, INT_PTR cp, INT_PTR rt)
static unsigned char * EEL_GLUE_set_immediate (void *_p, INT_PTR newv)
static void GLUE_SET_PX_FROM_WTP (void *b, int wv)
static int GLUE_POP_FPSTACK_TO_PTR (unsigned char *buf, void *destptr)
static void GLUE_PUSH_VAL_AT_PX_TO_FPSTACK (void *b, int wv)
static void GLUE_POP_FPSTACK_TO_WTP_TO_PX (unsigned char *buf, int wv)
static voidGLUE_realAddress (void *fn, int *size)
static void GLUE_STORE_P1_TO_STACK_AT_OFFS (void *b, int offs)
static void GLUE_MOVE_PX_STACKPTR_GEN (void *b, int wv)
static void GLUE_MOVE_STACK (void *b, int amt)

Variables

static const unsigned char GLUE_JMP_NC [] = { 0x48,0, 0, 0, }
static const unsigned int GLUE_JMP_IF_P1_Z []
static const unsigned int GLUE_JMP_IF_P1_NZ []
static const unsigned int GLUE_FUNC_ENTER [2] = { 0x7CA802A6, 0x94A1FFF0 }
static const unsigned int GLUE_FUNC_LEAVE [3] = { 0x80A10000, 0x38210010, 0x7CA803A6 }
static const unsigned int GLUE_RET [] ={0x4E800020}
static const unsigned int GLUE_PUSH_P1 [1] ={ 0x9461FFF0}
static const unsigned int GLUE_PUSH_P1PTR_AS_VALUE [] = { 0xC8430000, 0xDC41FFF0 }
static const unsigned int GLUE_POP_FPSTACK [1] = { 0 }
static const unsigned int GLUE_POP_FPSTACK_TOSTACK []
static const unsigned int GLUE_POP_FPSTACK_TO_WTP []
static unsigned int GLUE_POP_STACK_TO_FPSTACK [1] = { 0 }
static const unsigned int GLUE_SET_P1_Z [] = { 0x38600000 }
static const unsigned int GLUE_SET_P1_NZ [] = { 0x38600001 }

Macro Definition Documentation

◆ GLUE_FUNC_ENTER_SIZE

#define GLUE_FUNC_ENTER_SIZE   8

◆ GLUE_FUNC_LEAVE_SIZE

#define GLUE_FUNC_LEAVE_SIZE   12

◆ GLUE_JMP_SET_OFFSET

#define GLUE_JMP_SET_OFFSET ( endOfInstruction,
offset )
Value:
(((short *)(endOfInstruction))[-1] = ((offset) + 4) & 0xFFFC)

◆ GLUE_MAX_FPSTACK_SIZE

#define GLUE_MAX_FPSTACK_SIZE   0

◆ GLUE_MAX_JMPSIZE

#define GLUE_MAX_JMPSIZE   30000

◆ GLUE_MOV_PX_DIRECTVALUE_SIZE

#define GLUE_MOV_PX_DIRECTVALUE_SIZE   8

◆ GLUE_MOVE_PX_STACKPTR_SIZE

#define GLUE_MOVE_PX_STACKPTR_SIZE   4

◆ GLUE_MOVE_STACK_SIZE

#define GLUE_MOVE_STACK_SIZE   4

◆ GLUE_POP_FPSTACK_SIZE

#define GLUE_POP_FPSTACK_SIZE   0

◆ GLUE_POP_FPSTACK_TO_WTP_TO_PX_SIZE

#define GLUE_POP_FPSTACK_TO_WTP_TO_PX_SIZE   (sizeof(GLUE_POP_FPSTACK_TO_WTP) + GLUE_SET_PX_FROM_WTP_SIZE)

◆ GLUE_POP_PX_SIZE

#define GLUE_POP_PX_SIZE   8

◆ GLUE_PUSH_VAL_AT_PX_TO_FPSTACK_SIZE

#define GLUE_PUSH_VAL_AT_PX_TO_FPSTACK_SIZE   4

◆ GLUE_SET_PX_FROM_P1_SIZE

#define GLUE_SET_PX_FROM_P1_SIZE   4

◆ GLUE_SET_PX_FROM_WTP_SIZE

#define GLUE_SET_PX_FROM_WTP_SIZE   sizeof(int)

◆ GLUE_STORE_P1_TO_STACK_AT_OFFS_SIZE

#define GLUE_STORE_P1_TO_STACK_AT_OFFS_SIZE ( x)
Value:
4

Function Documentation

◆ EEL_GLUE_set_immediate()

unsigned char * EEL_GLUE_set_immediate ( void * _p,
INT_PTR newv )
static

◆ GLUE_CALL_CODE()

void GLUE_CALL_CODE ( INT_PTR bp,
INT_PTR cp,
INT_PTR rt )
static

◆ GLUE_COPY_VALUE_AT_P1_TO_PTR()

int GLUE_COPY_VALUE_AT_P1_TO_PTR ( unsigned char * buf,
void * destptr )
static

◆ GLUE_MOV_PX_DIRECTVALUE_GEN()

void GLUE_MOV_PX_DIRECTVALUE_GEN ( void * b,
INT_PTR v,
int wv )
static

◆ GLUE_MOVE_PX_STACKPTR_GEN()

void GLUE_MOVE_PX_STACKPTR_GEN ( void * b,
int wv )
static

◆ GLUE_MOVE_STACK()

void GLUE_MOVE_STACK ( void * b,
int amt )
static

◆ GLUE_POP_FPSTACK_TO_PTR()

int GLUE_POP_FPSTACK_TO_PTR ( unsigned char * buf,
void * destptr )
static

◆ GLUE_POP_FPSTACK_TO_WTP_TO_PX()

void GLUE_POP_FPSTACK_TO_WTP_TO_PX ( unsigned char * buf,
int wv )
static

◆ GLUE_POP_PX()

void GLUE_POP_PX ( void * b,
int wv )
static

◆ GLUE_POP_VALUE_TO_ADDR()

int GLUE_POP_VALUE_TO_ADDR ( unsigned char * buf,
void * destptr )
static

◆ GLUE_PUSH_VAL_AT_PX_TO_FPSTACK()

void GLUE_PUSH_VAL_AT_PX_TO_FPSTACK ( void * b,
int wv )
static

◆ GLUE_realAddress()

void * GLUE_realAddress ( void * fn,
int * size )
static

◆ GLUE_RESET_WTP()

int GLUE_RESET_WTP ( unsigned char * out,
void * ptr )
static

◆ GLUE_SET_PX_FROM_P1()

void GLUE_SET_PX_FROM_P1 ( void * b,
int wv )
static

◆ GLUE_SET_PX_FROM_WTP()

void GLUE_SET_PX_FROM_WTP ( void * b,
int wv )
static

◆ GLUE_STORE_P1_TO_STACK_AT_OFFS()

void GLUE_STORE_P1_TO_STACK_AT_OFFS ( void * b,
int offs )
static

Variable Documentation

◆ GLUE_FUNC_ENTER

const unsigned int GLUE_FUNC_ENTER[2] = { 0x7CA802A6, 0x94A1FFF0 }
static

◆ GLUE_FUNC_LEAVE

const unsigned int GLUE_FUNC_LEAVE[3] = { 0x80A10000, 0x38210010, 0x7CA803A6 }
static

◆ GLUE_JMP_IF_P1_NZ

const unsigned int GLUE_JMP_IF_P1_NZ[]
static
Initial value:
=
{
0x2f830000,
0x409e0000,
}

◆ GLUE_JMP_IF_P1_Z

const unsigned int GLUE_JMP_IF_P1_Z[]
static
Initial value:
=
{
0x2f830000,
0x419e0000,
}

◆ GLUE_JMP_NC

const unsigned char GLUE_JMP_NC[] = { 0x48,0, 0, 0, }
static

◆ GLUE_POP_FPSTACK

const unsigned int GLUE_POP_FPSTACK[1] = { 0 }
static

◆ GLUE_POP_FPSTACK_TO_WTP

const unsigned int GLUE_POP_FPSTACK_TO_WTP[]
static
Initial value:
= {
0xdc300008,
}

◆ GLUE_POP_FPSTACK_TOSTACK

const unsigned int GLUE_POP_FPSTACK_TOSTACK[]
static
Initial value:
= {
0xdc21fff0,
}

◆ GLUE_POP_STACK_TO_FPSTACK

unsigned int GLUE_POP_STACK_TO_FPSTACK[1] = { 0 }
static

◆ GLUE_PUSH_P1

const unsigned int GLUE_PUSH_P1[1] ={ 0x9461FFF0}
static

◆ GLUE_PUSH_P1PTR_AS_VALUE

const unsigned int GLUE_PUSH_P1PTR_AS_VALUE[] = { 0xC8430000, 0xDC41FFF0 }
static

◆ GLUE_RET

const unsigned int GLUE_RET[] ={0x4E800020}
static

◆ GLUE_SET_P1_NZ

const unsigned int GLUE_SET_P1_NZ[] = { 0x38600001 }
static

◆ GLUE_SET_P1_Z

const unsigned int GLUE_SET_P1_Z[] = { 0x38600000 }
static