diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-10-25 05:12:34 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-10-25 05:12:34 +0300 |
commit | 030130942562bb7b84eeba53e0226abed5a63a4c (patch) | |
tree | 9b49208facf2801369c9d2d7b3e7af11fab36829 /loader | |
parent | 562d86d95cbba67cb58358f6fc334553a467dee7 (diff) | |
parent | 15a80092161a1cd305f8005c780c744416a5252b (diff) | |
download | mpv-030130942562bb7b84eeba53e0226abed5a63a4c.tar.bz2 mpv-030130942562bb7b84eeba53e0226abed5a63a4c.tar.xz |
Merge svn changes up to 27824
Conflicts:
cfg-common-opts.h
libmpcodecs/dec_video.c
libmpcodecs/vd.c
libvo/x11_common.h
mplayer.c
stream/cache2.c
Diffstat (limited to 'loader')
-rw-r--r-- | loader/com.h | 4 | ||||
-rw-r--r-- | loader/drv.c | 8 | ||||
-rw-r--r-- | loader/ldt_keeper.c | 6 | ||||
-rw-r--r-- | loader/qtx/qtxload.c | 6 | ||||
-rw-r--r-- | loader/win32.c | 28 | ||||
-rw-r--r-- | loader/wine/windef.h | 2 | ||||
-rw-r--r-- | loader/wine/winnt.h | 2 |
7 files changed, 26 insertions, 30 deletions
diff --git a/loader/com.h b/loader/com.h index 3e9c1f3692..27f6a916b7 100644 --- a/loader/com.h +++ b/loader/com.h @@ -18,8 +18,6 @@ * Internal functions and structures for COM emulation code. */ -#if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) - #ifdef __cplusplus extern "C" { #endif @@ -89,6 +87,4 @@ void STDCALL CoTaskMemFree(void*); }; #endif /* __cplusplus */ -#endif /* WIN32 */ - #endif /* MPLAYER_COM_H */ diff --git a/loader/drv.c b/loader/drv.c index 5d4f0dcb93..b8fecf7467 100644 --- a/loader/drv.c +++ b/loader/drv.c @@ -52,7 +52,7 @@ extern char* def_path; #else // this asm code is no longer needed #define STORE_ALL \ - __asm__ __volatile__ ( \ + __asm__ volatile ( \ "push %%ebx\n\t" \ "push %%ecx\n\t" \ "push %%edx\n\t" \ @@ -60,7 +60,7 @@ extern char* def_path; "push %%edi\n\t"::) #define REST_ALL \ - __asm__ __volatile__ ( \ + __asm__ volatile ( \ "pop %%edi\n\t" \ "pop %%esi\n\t" \ "pop %%edx\n\t" \ @@ -98,7 +98,7 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, #endif if (!module || !module->hDriverModule || !module->DriverProc) return -1; #ifndef __svr4__ - __asm__ __volatile__ ("fsave (%0)\n\t": :"r"(&qw)); + __asm__ volatile ("fsave (%0)\n\t": :"r"(&qw)); #endif #ifdef WIN32_LOADER @@ -110,7 +110,7 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, REST_ALL; #ifndef __svr4__ - __asm__ __volatile__ ("frstor (%0)\n\t": :"r"(&qw)); + __asm__ volatile ("frstor (%0)\n\t": :"r"(&qw)); #endif #ifdef DETAILED_OUT diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c index ef9386435e..e0d4447e60 100644 --- a/loader/ldt_keeper.c +++ b/loader/ldt_keeper.c @@ -138,7 +138,7 @@ void Setup_FS_Segment(void) { unsigned int ldt_desc = LDT_SEL(fs_ldt); - __asm__ __volatile__( + __asm__ volatile( "movl %0,%%eax; movw %%ax, %%fs" : : "r" (ldt_desc) :"eax" ); @@ -154,7 +154,7 @@ static int LDT_Modify( int func, struct modify_ldt_ldt_s *ptr, { int res; #ifdef __PIC__ - __asm__ __volatile__( "pushl %%ebx\n\t" + __asm__ volatile( "pushl %%ebx\n\t" "movl %2,%%ebx\n\t" "int $0x80\n\t" "popl %%ebx" @@ -165,7 +165,7 @@ static int LDT_Modify( int func, struct modify_ldt_ldt_s *ptr, "d"(16)//sizeof(*ptr) from kernel point of view :"esi" ); #else - __asm__ __volatile__("int $0x80" + __asm__ volatile("int $0x80" : "=a" (res) : "0" (__NR_modify_ldt), "b" (func), diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c index 772ee5b0c5..0fb13aa9a4 100644 --- a/loader/qtx/qtxload.c +++ b/loader/qtx/qtxload.c @@ -7,7 +7,7 @@ #include "ldt_keeper.h" #include "mp_msg.h" -/* ilyen egy sima komponens */ +/* this is what a plain component looks like */ ComponentResult ComponentDummy( ComponentParameters *params, void **globals, @@ -104,7 +104,7 @@ int main(int argc, char *argv[]){ printf("params: flags: %d, paramSize: %d, what: %d, params[0] = %x\n", params->flags, params->paramSize, params->what, params->params[0]); -// __asm__ __volatile__ ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); +// __asm__ volatile ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); // printf("ESP=%p\n",esp); *((void**)0x62b7d640) = &x_table[0]; //malloc(0x00001837 * 4); // ugly hack? @@ -113,7 +113,7 @@ int main(int argc, char *argv[]){ ret = dispatcher(params, &globals); -// __asm__ __volatile__ ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); +// __asm__ volatile ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); // printf("ESP=%p\n",esp); printf("!!! CDComponentDispatch() => %d glob=%p\n",ret,globals); diff --git a/loader/win32.c b/loader/win32.c index 13f880c137..576e3bd945 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -79,7 +79,7 @@ char* def_path = WIN32_PATH; static void do_cpuid(unsigned int ax, unsigned int *regs) { - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx; pushl %%ecx; pushl %%edx;" ".byte 0x0f, 0xa2;" @@ -95,7 +95,7 @@ static void do_cpuid(unsigned int ax, unsigned int *regs) static unsigned int c_localcount_tsc() { int a; - __asm__ __volatile__ + __asm__ volatile ( "rdtsc\n\t" :"=a"(a) @@ -106,7 +106,7 @@ static unsigned int c_localcount_tsc() } static void c_longcount_tsc(long long* z) { - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx\n\t" "movl %%eax, %%ebx\n\t" @@ -2867,7 +2867,7 @@ static int WINAPI expIsBadStringPtrA(const char* string, int nchars) static long WINAPI expInterlockedExchangeAdd( long* dest, long incr ) { long ret; - __asm__ __volatile__ + __asm__ volatile ( "lock; xaddl %0,(%1)" : "=r" (ret) @@ -4006,7 +4006,7 @@ static int exp_initterm(INITTERMFUNC *start, INITTERMFUNC *end) // ok this trick with push/pop is necessary as otherwice // edi/esi registers are being trashed void* p = *start; - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx \n\t" "pushl %%ecx \n\t" @@ -4272,7 +4272,7 @@ static double expcos(double x) static void explog10(void) { - __asm__ __volatile__ + __asm__ volatile ( "fldl 8(%esp) \n\t" "fldln2 \n\t" @@ -4283,7 +4283,7 @@ static void explog10(void) static void expcos(void) { - __asm__ __volatile__ + __asm__ volatile ( "fldl 8(%esp) \n\t" "fcos \n\t" @@ -4300,7 +4300,7 @@ static void expcos(void) static void exp_ftol(void) { - __asm__ __volatile__ + __asm__ volatile ( "sub $12, %esp \n\t" "fstcw -2(%ebp) \n\t" @@ -4319,8 +4319,8 @@ static void exp_ftol(void) } #define FPU_DOUBLES(var1,var2) double var1,var2; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) + __asm__ volatile( "fstpl %0;fwait" : "=m" (var2) : ); \ + __asm__ volatile( "fstpl %0;fwait" : "=m" (var1) : ) static double exp_CIpow(void) { @@ -4361,7 +4361,7 @@ static int exp_setjmp3(void* jmpbuf, int x) { //dbgprintf("!!!!UNIMPLEMENTED: setjmp3(%p, %d) => 0\n", jmpbuf, x); //return 0; - __asm__ __volatile__ + __asm__ volatile ( //"mov 4(%%esp), %%edx \n\t" "mov (%%esp), %%eax \n\t" @@ -4383,7 +4383,7 @@ static int exp_setjmp3(void* jmpbuf, int x) : "eax" ); #if 1 - __asm__ __volatile__ + __asm__ volatile ( "mov %%fs:0, %%eax \n\t" // unsure "mov %%eax, 24(%%edx) \n\t" @@ -4569,7 +4569,7 @@ static INT WINAPI expMessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type 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 ( + __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) @@ -4762,7 +4762,7 @@ static double expfloor(double x) } #define FPU_DOUBLE(var) double var; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) + __asm__ volatile( "fstpl %0;fwait" : "=m" (var) : ) static double exp_CIcos(void) { diff --git a/loader/wine/windef.h b/loader/wine/windef.h index 7b836e12a4..9d90a42257 100644 --- a/loader/wine/windef.h +++ b/loader/wine/windef.h @@ -94,7 +94,7 @@ extern "C" { # ifndef _EGCS_ #define __stdcall __attribute__((__stdcall__)) #define __cdecl __attribute__((__cdecl__)) -# define RESTORE_ES __asm__ __volatile__("pushl %ds\n\tpopl %es") +# define RESTORE_ES __asm__ volatile("pushl %ds\n\tpopl %es") # endif # else // # error You need gcc >= 2.7 to build Wine on a 386 diff --git a/loader/wine/winnt.h b/loader/wine/winnt.h index cbe06f6976..19594e71b1 100644 --- a/loader/wine/winnt.h +++ b/loader/wine/winnt.h @@ -693,7 +693,7 @@ typedef HANDLE *PHANDLE; #else /* __GNUC__ */ # define ASM_GLOBAL_FUNC(name,code) \ void asm_dummy_##name(void) { \ - asm( ".align 4\n\t" \ + __asm__( ".align 4\n\t" \ ".globl " ASM_NAME(#name) "\n\t" \ ".type " ASM_NAME(#name) ",@function\n" \ ASM_NAME(#name) ":\n\t" \ |