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

Go to the source code of this file.

Macros

#define GLUE_HAS_FPREG2   1
#define GLUE_MAX_SPILL_REGS   8
#define GLUE_SAVE_TO_SPILL_SIZE(x)
#define GLUE_RESTORE_SPILL_TO_FPREG2_SIZE(x)
#define GLUE_MAX_FPSTACK_SIZE   0
#define GLUE_MAX_JMPSIZE   ((1<<25) - 1024)
#define GLUE_JMP_SET_OFFSET(endOfInstruction, offset)
#define GLUE_MOV_PX_DIRECTVALUE_TOFPREG2_SIZE   12
#define GLUE_MOV_PX_DIRECTVALUE_SIZE   8
#define GLUE_FUNC_ENTER_SIZE   4
#define GLUE_FUNC_LEAVE_SIZE   0
#define GLUE_STORE_P1_TO_STACK_AT_OFFS_SIZE(x)
#define GLUE_MOVE_PX_STACKPTR_SIZE   4
#define GLUE_MOVE_STACK_SIZE   4
#define GLUE_POP_PX_SIZE   4
#define GLUE_SET_PX_FROM_P1_SIZE   4
#define GLUE_CALL_CODE(bp, cp, rt)
#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)

Functions

static void GLUE_RESTORE_SPILL_TO_FPREG2 (void *b, int ws)
static void GLUE_SAVE_TO_SPILL (void *b, int ws)
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 int arm_encode_constforalu (int amt)
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)
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)
 __attribute__ ((target("arm"))) static void eel_callcode32(INT_PTR bp
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 unsigned int __attribute__ ((unused)) glue_getscr()
void eel_enterfp (int s[2])
void eel_leavefp (int s[2])

Variables

static const unsigned int GLUE_COPY_FPSTACK_TO_FPREG2 []
static unsigned int GLUE_POP_STACK_TO_FPREG2 []
static const unsigned int GLUE_JMP_NC [] = { 0xEA000000 }
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 [1] = { 0xe92d4010 }
static const unsigned int GLUE_FUNC_LEAVE [1] = { 0 }
static const unsigned int GLUE_RET [] ={ 0xe8bd8010 }
static const unsigned int GLUE_PUSH_P1 [1] ={ 0xe52d0008 }
static const unsigned int GLUE_PUSH_P1PTR_AS_VALUE []
static const double __consttab []
INT_PTR cp
INT_PTR INT_PTR rt
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 const unsigned int GLUE_SET_P1_Z [] = { 0xe3a00000 }
static const unsigned int GLUE_SET_P1_NZ [] = { 0xe3a00001 }

Macro Definition Documentation

◆ GLUE_CALL_CODE

#define GLUE_CALL_CODE ( bp,
cp,
rt )
Value:
do { \
unsigned int f; \
if (!(h->compile_flags&NSEEL_CODE_COMPILE_FLAG_NOFPSTATE) && \
!((f=glue_getscr())&(1<<24))) { \
glue_setscr(f|(1<<24)); \
eel_callcode32(bp, cp, rt); \
glue_setscr(f); \
} else eel_callcode32(bp, cp, rt);\
} while(0)
unsigned f
Definition inflate.c:1572
INT_PTR INT_PTR rt
Definition glue_arm.h:222
static void eel_callcode32(INT_PTR cp, INT_PTR ramptr)
Definition glue_x86.h:232
#define NSEEL_CODE_COMPILE_FLAG_NOFPSTATE
Definition ns-eel.h:176
uch h[RAND_HEAD_LEN]
Definition crypt.c:459
char * cp
Definition unix.c:513

◆ GLUE_FUNC_ENTER_SIZE

#define GLUE_FUNC_ENTER_SIZE   4

◆ GLUE_FUNC_LEAVE_SIZE

#define GLUE_FUNC_LEAVE_SIZE   0

◆ GLUE_HAS_FPREG2

#define GLUE_HAS_FPREG2   1

◆ GLUE_JMP_SET_OFFSET

#define GLUE_JMP_SET_OFFSET ( endOfInstruction,
offset )
Value:
(((int *)(endOfInstruction))[-1] = (((int *)(endOfInstruction))[-1]&0xFF000000)|((((offset)>>2)-1)))

◆ GLUE_MAX_FPSTACK_SIZE

#define GLUE_MAX_FPSTACK_SIZE   0

◆ GLUE_MAX_JMPSIZE

#define GLUE_MAX_JMPSIZE   ((1<<25) - 1024)

◆ GLUE_MAX_SPILL_REGS

#define GLUE_MAX_SPILL_REGS   8

◆ GLUE_MOV_PX_DIRECTVALUE_SIZE

#define GLUE_MOV_PX_DIRECTVALUE_SIZE   8

◆ GLUE_MOV_PX_DIRECTVALUE_TOFPREG2_SIZE

#define GLUE_MOV_PX_DIRECTVALUE_TOFPREG2_SIZE   12

◆ 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   4

◆ GLUE_PUSH_VAL_AT_PX_TO_FPSTACK_SIZE

#define GLUE_PUSH_VAL_AT_PX_TO_FPSTACK_SIZE   4

◆ GLUE_RESTORE_SPILL_TO_FPREG2_SIZE

#define GLUE_RESTORE_SPILL_TO_FPREG2_SIZE ( x)
Value:
(4)

◆ GLUE_SAVE_TO_SPILL_SIZE

#define GLUE_SAVE_TO_SPILL_SIZE ( x)
Value:
(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:
((x)>=4096 ? 8 : 4)
unsigned x[BMAX+1]
Definition inflate.c:1586

Function Documentation

◆ __attribute__() [1/2]

__attribute__ ( (target("arm")) )

◆ __attribute__() [2/2]

void __attribute__ ( (unused) )
static

◆ arm_encode_constforalu()

int arm_encode_constforalu ( int amt)
static

◆ eel_enterfp()

void eel_enterfp ( int s[2])

◆ EEL_GLUE_set_immediate()

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

◆ eel_leavefp()

void eel_leavefp ( int s[2])

◆ 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_RESTORE_SPILL_TO_FPREG2()

void GLUE_RESTORE_SPILL_TO_FPREG2 ( void * b,
int ws )
static

◆ GLUE_SAVE_TO_SPILL()

void GLUE_SAVE_TO_SPILL ( void * b,
int ws )
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

◆ __consttab

const double __consttab[]
static
Initial value:
= {
0.0,
1.0,
-1.0,
-0.5,
1.5,
}
#define NSEEL_CLOSEFACTOR
Definition ns-eel-int.h:101

◆ cp

INT_PTR cp

◆ GLUE_COPY_FPSTACK_TO_FPREG2

const unsigned int GLUE_COPY_FPSTACK_TO_FPREG2[]
static
Initial value:
= {
0xeeb01b40
}

◆ GLUE_FUNC_ENTER

const unsigned int GLUE_FUNC_ENTER[1] = { 0xe92d4010 }
static

◆ GLUE_FUNC_LEAVE

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

◆ GLUE_JMP_IF_P1_NZ

const unsigned int GLUE_JMP_IF_P1_NZ[]
static
Initial value:
=
{
0xe1100000,
0x1A000000,
}

◆ GLUE_JMP_IF_P1_Z

const unsigned int GLUE_JMP_IF_P1_Z[]
static
Initial value:
=
{
0xe1100000,
0x0A000000,
}

◆ GLUE_JMP_NC

const unsigned int GLUE_JMP_NC[] = { 0xEA000000 }
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:
= {
0xed850b00,
0xe2855008,
}

◆ GLUE_POP_FPSTACK_TOSTACK

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

◆ GLUE_POP_STACK_TO_FPREG2

unsigned int GLUE_POP_STACK_TO_FPREG2[]
static
Initial value:
= {
0xed9d1b00,
0xe28dd008,
}

◆ GLUE_PUSH_P1

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

◆ GLUE_PUSH_P1PTR_AS_VALUE

const unsigned int GLUE_PUSH_P1PTR_AS_VALUE[]
static
Initial value:
=
{
0xed907b00,
0xe24dd008,
0xed8d7b00,
}

◆ GLUE_RET

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

◆ GLUE_SET_P1_NZ

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

◆ GLUE_SET_P1_Z

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

◆ rt

Initial value:
{
__asm__ volatile(
"mov r7, %2\n"
"mov r6, %3\n"
"mov r8, %1\n"
"mov r0, %0\n"
"mov r1, sp\n"
"bic sp, sp, #7\n"
"push {r1, lr}\n"
"blx r0\n"
"pop {r1, lr}\n"
"mov sp, r1\n"
::"r" (cp), "r" (bp), "r" (rt), "r" (__consttab) :
"r5", "r6", "r7", "r8", "r10",
"d8","d9","d10","d11","d12","d13","d14","d15")
static const double __consttab[]
Definition glue_arm.h:211