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

Go to the source code of this file.

Classes

struct  roundinftab

Macros

#define GLUE_MAX_FPSTACK_SIZE   8
#define GLUE_JMP_SET_OFFSET(endOfInstruction, offset)
#define GLUE_FUNC_ENTER_SIZE   0
#define GLUE_FUNC_LEAVE_SIZE   0
#define GLUE_MOV_PX_DIRECTVALUE_SIZE   5
#define GLUE_MOV_PX_DIRECTVALUE_TOSTACK_SIZE   6
#define GLUE_STORE_P1_TO_STACK_AT_OFFS_SIZE(x)
#define GLUE_MOVE_PX_STACKPTR_SIZE   2
#define GLUE_MOVE_STACK_SIZE   6
#define GLUE_POP_PX_SIZE   4
#define GLUE_SET_PX_FROM_P1_SIZE   2
#define GLUE_POP_FPSTACK_SIZE   2
#define GLUE_SET_PX_FROM_WTP_SIZE   2
#define GLUE_PUSH_VAL_AT_PX_TO_FPSTACK_SIZE   2
#define GLUE_POP_FPSTACK_TO_WTP_TO_PX_SIZE   (GLUE_SET_PX_FROM_WTP_SIZE + sizeof(GLUE_POP_FPSTACK_TO_WTP))
#define GLUE_TABPTR_IGNORED
#define GLUE_CALL_CODE(bp, cp, rt)
#define INT_TO_LECHARS(x)
#define GLUE_INLINE_LOOPS
#define GLUE_LOOP_LOADCNT_SIZE   (nseel_has_sse3() ? sizeof(GLUE_LOOP_LOADCNT_SSE3) : sizeof(GLUE_LOOP_LOADCNT_NOSSE3))
#define GLUE_LOOP_LOADCNT   (nseel_has_sse3() ? GLUE_LOOP_LOADCNT_SSE3 : GLUE_LOOP_LOADCNT_NOSSE3)
#define GLUE_LOOP_CLAMPCNT_SIZE   0
#define GLUE_LOOP_CLAMPCNT   ""
#define GLUE_LOOP_BEGIN_SIZE   sizeof(GLUE_LOOP_BEGIN)
#define GLUE_WHILE_SETUP_SIZE   0
#define GLUE_WHILE_SETUP   ""
#define GLUE_WHILE_END_NOJUMP
#define GLUE_HAS_FLDZ
#define GLUE_HAS_FLD1
#define GLUE_INVSQRT_NEEDREPL   &negativezeropointfive, &onepointfive,
#define GLUE_HAS_NATIVE_TRIGSQRTLOG

Functions

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 int GLUE_POP_FPSTACK_TO_PTR (unsigned char *buf, void *destptr)
static void GLUE_MOV_PX_DIRECTVALUE_GEN (void *b, INT_PTR v, int wv)
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 void GLUE_SET_PX_FROM_WTP (void *b, int wv)
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 int GLUE_RESET_WTP (unsigned char *out, void *ptr)
static void eel_callcode32 (INT_PTR cp, INT_PTR ramptr)
void eel_enterfp (int s[2])
void eel_leavefp (int s[2])
static void eel_callcode32_fast (INT_PTR cp, INT_PTR ramptr)
static unsigned char * EEL_GLUE_set_immediate (void *_p, INT_PTR newv)
void nseel_asm_or (void)
void nseel_asm_or0 (void)
void nseel_asm_or_op (void)
void nseel_asm_and (void)
void nseel_asm_and_op (void)
void nseel_asm_xor (void)
void nseel_asm_xor_op (void)
void nseel_asm_shl (void)
void nseel_asm_shr (void)
void nseel_asm_mod (void)
void nseel_asm_mod_op (void)
void nseel_asm_stack_peek (void)
void _asm_gmegabuf (void)
void _asm_megabuf (void)
static void eel_fixup_sse3 (unsigned char *p, unsigned char *endp, int np, int flag)
static int nseel_has_sse3 ()
static voidGLUE_realAddress (void *fn, int *size)

Variables

static const unsigned char GLUE_JMP_NC [] = { 0xE9, 0,0,0,0, }
static const unsigned char GLUE_JMP_IF_P1_Z [] = {0x85, 0xC0, 0x0F, 0x84, 0,0,0,0 }
static const unsigned char GLUE_JMP_IF_P1_NZ [] = {0x85, 0xC0, 0x0F, 0x85, 0,0,0,0 }
static const unsigned int GLUE_FUNC_ENTER [1]
static const unsigned int GLUE_FUNC_LEAVE [1]
static const unsigned char GLUE_PUSH_P1PTR_AS_VALUE []
static const unsigned char GLUE_PUSH_P1 [4] ={0x83, 0xEC, 12, 0x50}
static const unsigned char GLUE_POP_FPSTACK [2] = { 0xDD, 0xD8 }
static const unsigned char GLUE_POP_FPSTACK_TOSTACK []
static const unsigned char GLUE_POP_STACK_TO_FPSTACK []
static const unsigned char GLUE_POP_FPSTACK_TO_WTP []
static const unsigned char GLUE_RET =0xC3
static const unsigned char GLUE_LOOP_LOADCNT_SSE3 []
static const unsigned char GLUE_LOOP_LOADCNT_NOSSE3 []
static const unsigned char GLUE_LOOP_BEGIN []
static const unsigned char GLUE_LOOP_END []
static const unsigned char GLUE_WHILE_BEGIN []
static const unsigned char GLUE_WHILE_END []
static const unsigned char GLUE_WHILE_CHECK_RV []
static const unsigned char GLUE_SET_P1_Z [] = { 0x29, 0xC0 }
static const unsigned char GLUE_SET_P1_NZ [] = { 0xb0, 0x01 }
static const unsigned char GLUE_FXCH [] = {0xd9, 0xc9}
static const unsigned char GLUE_FLDZ [] = {0xd9, 0xee}
static const unsigned char GLUE_FLD1 [] = {0xd9, 0xe8}
static EEL_F negativezeropointfive =-0.5f
static EEL_F onepointfive =1.5f
static struct roundinftab s_round_fixes []

Macro Definition Documentation

◆ GLUE_CALL_CODE

#define GLUE_CALL_CODE ( bp,
cp,
rt )
Value:
do { \
} while(0)
INT_PTR INT_PTR rt
Definition glue_arm.h:222
static void eel_callcode32_fast(INT_PTR cp, INT_PTR ramptr)
Definition glue_x86.h:341
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   0

◆ GLUE_FUNC_LEAVE_SIZE

#define GLUE_FUNC_LEAVE_SIZE   0

◆ GLUE_HAS_FLD1

#define GLUE_HAS_FLD1

◆ GLUE_HAS_FLDZ

#define GLUE_HAS_FLDZ

◆ GLUE_HAS_NATIVE_TRIGSQRTLOG

#define GLUE_HAS_NATIVE_TRIGSQRTLOG

◆ GLUE_INLINE_LOOPS

#define GLUE_INLINE_LOOPS

◆ GLUE_INVSQRT_NEEDREPL

#define GLUE_INVSQRT_NEEDREPL   &negativezeropointfive, &onepointfive,

◆ GLUE_JMP_SET_OFFSET

#define GLUE_JMP_SET_OFFSET ( endOfInstruction,
offset )
Value:
(((int *)(endOfInstruction))[-1] = (offset))

◆ GLUE_LOOP_BEGIN_SIZE

#define GLUE_LOOP_BEGIN_SIZE   sizeof(GLUE_LOOP_BEGIN)

◆ GLUE_LOOP_CLAMPCNT

#define GLUE_LOOP_CLAMPCNT   ""

◆ GLUE_LOOP_CLAMPCNT_SIZE

#define GLUE_LOOP_CLAMPCNT_SIZE   0

◆ GLUE_LOOP_LOADCNT

#define GLUE_LOOP_LOADCNT   (nseel_has_sse3() ? GLUE_LOOP_LOADCNT_SSE3 : GLUE_LOOP_LOADCNT_NOSSE3)

◆ GLUE_LOOP_LOADCNT_SIZE

#define GLUE_LOOP_LOADCNT_SIZE   (nseel_has_sse3() ? sizeof(GLUE_LOOP_LOADCNT_SSE3) : sizeof(GLUE_LOOP_LOADCNT_NOSSE3))

◆ GLUE_MAX_FPSTACK_SIZE

#define GLUE_MAX_FPSTACK_SIZE   8

◆ GLUE_MOV_PX_DIRECTVALUE_SIZE

#define GLUE_MOV_PX_DIRECTVALUE_SIZE   5

◆ GLUE_MOV_PX_DIRECTVALUE_TOSTACK_SIZE

#define GLUE_MOV_PX_DIRECTVALUE_TOSTACK_SIZE   6

◆ GLUE_MOVE_PX_STACKPTR_SIZE

#define GLUE_MOVE_PX_STACKPTR_SIZE   2

◆ GLUE_MOVE_STACK_SIZE

#define GLUE_MOVE_STACK_SIZE   6

◆ GLUE_POP_FPSTACK_SIZE

#define GLUE_POP_FPSTACK_SIZE   2

◆ GLUE_POP_FPSTACK_TO_WTP_TO_PX_SIZE

#define GLUE_POP_FPSTACK_TO_WTP_TO_PX_SIZE   (GLUE_SET_PX_FROM_WTP_SIZE + sizeof(GLUE_POP_FPSTACK_TO_WTP))

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

◆ GLUE_SET_PX_FROM_P1_SIZE

#define GLUE_SET_PX_FROM_P1_SIZE   2

◆ GLUE_SET_PX_FROM_WTP_SIZE

#define GLUE_SET_PX_FROM_WTP_SIZE   2

◆ GLUE_STORE_P1_TO_STACK_AT_OFFS_SIZE

#define GLUE_STORE_P1_TO_STACK_AT_OFFS_SIZE ( x)
Value:
7

◆ GLUE_TABPTR_IGNORED

#define GLUE_TABPTR_IGNORED

◆ GLUE_WHILE_END_NOJUMP

#define GLUE_WHILE_END_NOJUMP

◆ GLUE_WHILE_SETUP

#define GLUE_WHILE_SETUP   ""

◆ GLUE_WHILE_SETUP_SIZE

#define GLUE_WHILE_SETUP_SIZE   0

◆ INT_TO_LECHARS

#define INT_TO_LECHARS ( x)
Value:
((x)&0xff),(((x)>>8)&0xff), (((x)>>16)&0xff), (((x)>>24)&0xff)
unsigned x[BMAX+1]
Definition inflate.c:1586

Function Documentation

◆ _asm_gmegabuf()

void _asm_gmegabuf ( void )

◆ _asm_megabuf()

void _asm_megabuf ( void )

◆ eel_callcode32()

void eel_callcode32 ( INT_PTR cp,
INT_PTR ramptr )
static

◆ eel_callcode32_fast()

void eel_callcode32_fast ( INT_PTR cp,
INT_PTR ramptr )
static

◆ eel_enterfp()

void eel_enterfp ( int s[2])

◆ eel_fixup_sse3()

void eel_fixup_sse3 ( unsigned char * p,
unsigned char * endp,
int np,
int flag )
static

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

◆ nseel_asm_and()

void nseel_asm_and ( void )

◆ nseel_asm_and_op()

void nseel_asm_and_op ( void )

◆ nseel_asm_mod()

void nseel_asm_mod ( void )

◆ nseel_asm_mod_op()

void nseel_asm_mod_op ( void )

◆ nseel_asm_or()

void nseel_asm_or ( void )

◆ nseel_asm_or0()

void nseel_asm_or0 ( void )

◆ nseel_asm_or_op()

void nseel_asm_or_op ( void )

◆ nseel_asm_shl()

void nseel_asm_shl ( void )

◆ nseel_asm_shr()

void nseel_asm_shr ( void )

◆ nseel_asm_stack_peek()

void nseel_asm_stack_peek ( void )

◆ nseel_asm_xor()

void nseel_asm_xor ( void )

◆ nseel_asm_xor_op()

void nseel_asm_xor_op ( void )

◆ nseel_has_sse3()

int nseel_has_sse3 ( )
static

Variable Documentation

◆ GLUE_FLD1

const unsigned char GLUE_FLD1[] = {0xd9, 0xe8}
static

◆ GLUE_FLDZ

const unsigned char GLUE_FLDZ[] = {0xd9, 0xee}
static

◆ GLUE_FUNC_ENTER

const unsigned int GLUE_FUNC_ENTER[1]
static

◆ GLUE_FUNC_LEAVE

const unsigned int GLUE_FUNC_LEAVE[1]
static

◆ GLUE_FXCH

const unsigned char GLUE_FXCH[] = {0xd9, 0xc9}
static

◆ GLUE_JMP_IF_P1_NZ

const unsigned char GLUE_JMP_IF_P1_NZ[] = {0x85, 0xC0, 0x0F, 0x85, 0,0,0,0 }
static

◆ GLUE_JMP_IF_P1_Z

const unsigned char GLUE_JMP_IF_P1_Z[] = {0x85, 0xC0, 0x0F, 0x84, 0,0,0,0 }
static

◆ GLUE_JMP_NC

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

◆ GLUE_LOOP_BEGIN

const unsigned char GLUE_LOOP_BEGIN[]
static
Initial value:
={
0x56,
0x51,
0x81, 0xEC, 0x08, 0,0,0,
}

◆ GLUE_LOOP_END

const unsigned char GLUE_LOOP_END[]
static
Initial value:
={
0x81, 0xC4, 0x08, 0,0,0,
0x59,
0x5E,
0x49,
0x0f, 0x85, 0,0,0,0,
}

◆ GLUE_LOOP_LOADCNT_NOSSE3

const unsigned char GLUE_LOOP_LOADCNT_NOSSE3[]
static
Initial value:
={
0xd9, 0x7e, 0x04,
0x66, 0x8b, 0x46, 0x04,
0x66, 0x0d, 0x00, 0x0c,
0x66, 0x89, 0x46, 0x08,
0xd9, 0x6e, 0x08,
0xDB, 0x1E,
0xd9, 0x6e, 0x04,
0x8B, 0x0E,
0x81, 0xf9, 1,0,0,0,
0x0F, 0x8C, 0,0,0,0,
}

◆ GLUE_LOOP_LOADCNT_SSE3

const unsigned char GLUE_LOOP_LOADCNT_SSE3[]
static
Initial value:
={
0xdb, 0x0e,
0x8B, 0x0E,
0x81, 0xf9, 1,0,0,0,
0x0F, 0x8C, 0,0,0,0,
}

◆ GLUE_POP_FPSTACK

const unsigned char GLUE_POP_FPSTACK[2] = { 0xDD, 0xD8 }
static

◆ GLUE_POP_FPSTACK_TO_WTP

const unsigned char GLUE_POP_FPSTACK_TO_WTP[]
static
Initial value:
= {
0xDD, 0x1E,
0x83, 0xC6, 8,
}

◆ GLUE_POP_FPSTACK_TOSTACK

const unsigned char GLUE_POP_FPSTACK_TOSTACK[]
static
Initial value:
= {
0x83, 0xEC, 16,
0xDD, 0x1C, 0x24
}

◆ GLUE_POP_STACK_TO_FPSTACK

const unsigned char GLUE_POP_STACK_TO_FPSTACK[]
static
Initial value:
= {
0xDD, 0x04, 0x24,
0x83, 0xC4, 16
}

◆ GLUE_PUSH_P1

const unsigned char GLUE_PUSH_P1[4] ={0x83, 0xEC, 12, 0x50}
static

◆ GLUE_PUSH_P1PTR_AS_VALUE

const unsigned char GLUE_PUSH_P1PTR_AS_VALUE[]
static
Initial value:
=
{
0x83, 0xEC, 8,
0xff, 0x70, 0x4,
0xff, 0x30,
}

◆ GLUE_RET

const unsigned char GLUE_RET =0xC3
static

◆ GLUE_SET_P1_NZ

const unsigned char GLUE_SET_P1_NZ[] = { 0xb0, 0x01 }
static

◆ GLUE_SET_P1_Z

const unsigned char GLUE_SET_P1_Z[] = { 0x29, 0xC0 }
static

◆ GLUE_WHILE_BEGIN

const unsigned char GLUE_WHILE_BEGIN[]
static
Initial value:
={
0x56,
0x81, 0xEC, 12, 0,0,0,
}

◆ GLUE_WHILE_CHECK_RV

const unsigned char GLUE_WHILE_CHECK_RV[]
static
Initial value:
= {
0x85, 0xC0,
0x0F, 0x85, 0,0,0,0
}

◆ GLUE_WHILE_END

const unsigned char GLUE_WHILE_END[]
static
Initial value:
={
0x81, 0xC4, 12, 0,0,0,
0x5E,
}

◆ negativezeropointfive

EEL_F negativezeropointfive =-0.5f
static

◆ onepointfive

EEL_F onepointfive =1.5f
static

◆ s_round_fixes

struct roundinftab s_round_fixes[]
static
Initial value:
= {
{ nseel_asm_or, 2, },
{ nseel_asm_or_op, 2, },
{ nseel_asm_or0, 1, },
{ nseel_asm_and, 2, },
{ nseel_asm_xor, 2, },
{ nseel_asm_shl, 2, 1, },
{ nseel_asm_shr, 2, 1, },
{ nseel_asm_mod, 2, 1, },
{ nseel_asm_mod_op, 2, 1, },
{ _asm_megabuf, 1, 1, },
{ _asm_gmegabuf, 1, 2, },
}
void nseel_asm_xor_op(void)
Definition asm-nseel-aarch64-gcc.c:440
void nseel_asm_mod_op(void)
Definition asm-nseel-aarch64-gcc.c:368
void nseel_asm_or0(void)
Definition asm-nseel-aarch64-gcc.c:402
void nseel_asm_or_op(void)
Definition asm-nseel-aarch64-gcc.c:412
void nseel_asm_and(void)
Definition asm-nseel-aarch64-gcc.c:456
void nseel_asm_or(void)
Definition asm-nseel-aarch64-gcc.c:390
void nseel_asm_shl(void)
Definition asm-nseel-aarch64-gcc.c:344
void nseel_asm_stack_peek(void)
Definition asm-nseel-aarch64-gcc.c:1152
void nseel_asm_shr(void)
Definition asm-nseel-aarch64-gcc.c:356
void nseel_asm_xor(void)
Definition asm-nseel-aarch64-gcc.c:428
void _asm_gmegabuf(void)
Definition asm-nseel-aarch64-gcc.c:1028
void nseel_asm_mod(void)
Definition asm-nseel-aarch64-gcc.c:329
void _asm_megabuf(void)
Definition asm-nseel-aarch64-gcc.c:985
void nseel_asm_and_op(void)
Definition asm-nseel-aarch64-gcc.c:467