Get rid of stubs.S, move code to inline asm.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21384 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-11-29 12:56:52 +00:00
parent 2199f67906
commit 9e9d77018e
3 changed files with 21 additions and 20 deletions

View File

@ -8,7 +8,7 @@ CFLAGS= -Idshow -DMPLAYER -D__WINE__ -DNOAVIFILE_HEADERS
SRCS= driver.c afl.c vfl.c
ifneq ($(TARGET_WIN32),yes)
SRCS+= ldt_keeper.c pe_image.c module.c ext.c win32.c \
pe_resource.c resource.c registry.c elfdll.c stubs.S
pe_resource.c resource.c registry.c elfdll.c
# QTX emulation is not supported in Darwin
ifneq ($(TARGET_OS),Darwin)
SRCS+= wrapper.S

View File

@ -1,17 +0,0 @@
#if defined(__APPLE__)
# define SYM(x) _ ## x
#else
# define SYM(x) x
#endif
.data
.globl SYM(exp_EH_prolog)
SYM(exp_EH_prolog):
pushl $0xff
pushl %eax
pushl %fs:0
movl %esp, %fs:0
movl 12(%esp), %eax
movl %ebp, 12(%esp)
leal 12(%esp), %ebp
pushl %eax
ret

View File

@ -18,6 +18,7 @@ for DLL to know too much about its environment.
*/
#include "config.h"
#include "mangle.h"
#ifdef MPLAYER
#ifdef USE_QTX_CODECS
@ -4587,8 +4588,25 @@ static INT WINAPI expMessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type
/* these are needed for mss1 */
/* defined in stubs.s */
void exp_EH_prolog(void);
/**
* \brief this symbol is defined within exp_EH_prolog_dummy
* \param dest jump target
*/
void exp_EH_prolog(void *dest);
//! just a dummy function that acts a container for the asm section
void exp_EH_prolog_dummy(void) {
asm volatile (
// take care, this "function" may not change flags or
// registers besides eax (which is also why we can't use
// exp_EH_prolog_dummy directly)
MANGLE(exp_EH_prolog)": \n\t"
"pop %eax \n\t"
"push %ebp \n\t"
"mov %esp, %ebp \n\t"
"lea -12(%esp), %esp \n\t"
"jmp *%eax \n\t"
);
}
#include <netinet/in.h>
static WINAPI inline unsigned long int exphtonl(unsigned long int hostlong)