зеркало из https://github.com/mozilla/gecko-dev.git
Bug 615212 - GCC's win64 ABI change broke compilation on mingw-w64 (xptcall part) r=timeless a=NPOTB
This commit is contained in:
Родитель
fb011207a8
Коммит
09f98c2c94
|
@ -55,7 +55,9 @@ CPPSRCS = \
|
|||
xptcstubs.cpp \
|
||||
$(NULL)
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../unix
|
||||
ifneq ($(TARGET_CPU),x86_64)
|
||||
DEFINES += -DMOZ_USE_STDCALL -DMOZ_NEED_LEADING_UNDERSCORE
|
||||
endif
|
||||
else
|
||||
|
||||
# FIXME: bug 413019
|
||||
|
|
|
@ -34,23 +34,23 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
.extern _invoke_copy_to_stack
|
||||
.extern invoke_copy_to_stack
|
||||
|
||||
|
||||
.text
|
||||
.intel_syntax
|
||||
.intel_syntax noprefix
|
||||
|
||||
#
|
||||
#_XPTC__InvokebyIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
# PRUint32 paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.globl _XPTC__InvokebyIndex
|
||||
.def _XPTC__InvokebyIndex
|
||||
.globl XPTC__InvokebyIndex
|
||||
.def XPTC__InvokebyIndex
|
||||
.scl 3
|
||||
.type 46
|
||||
.endef
|
||||
_XPTC__InvokebyIndex:
|
||||
XPTC__InvokebyIndex:
|
||||
|
||||
#
|
||||
# store register parameters
|
||||
|
@ -104,7 +104,7 @@ _XPTC__InvokebyIndex:
|
|||
|
||||
sub rsp, 32
|
||||
|
||||
call _invoke_copy_to_stack # rcx = d
|
||||
call invoke_copy_to_stack # rcx = d
|
||||
# edx = paramCount
|
||||
# r8 = s
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#include "xptcprivate.h"
|
||||
#include "xptiprivate.h"
|
||||
#include "../unix/xptc_gcc_x86_unix.h"
|
||||
|
||||
/*
|
||||
* This is for Windows 64 bit (x86_64) using GCC syntax
|
||||
|
@ -213,7 +212,7 @@ PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex,
|
|||
|
||||
__asm__ (
|
||||
".text\n"
|
||||
".intel_syntax\n" /* switch to Intel syntax to look like the MSVC assembly */
|
||||
".intel_syntax noprefix\n" /* switch to Intel syntax to look like the MSVC assembly */
|
||||
".globl SharedStub\n"
|
||||
".def SharedStub ; .scl 3 ; .type 46 ; .endef \n"
|
||||
"SharedStub:\n"
|
||||
|
@ -262,7 +261,7 @@ __asm__ (
|
|||
|
||||
/* 1st parameter (this) (rcx) */
|
||||
|
||||
"call _PrepareAndDispatch\n"
|
||||
"call PrepareAndDispatch\n"
|
||||
|
||||
/* restore rcx */
|
||||
|
||||
|
@ -284,34 +283,33 @@ __asm__ (
|
|||
|
||||
/* back to AT&T syntax */
|
||||
".att_syntax\n"
|
||||
|
||||
);
|
||||
|
||||
#define STUB_ENTRY(n) \
|
||||
asm(".intel_syntax\n" /* this is in intel syntax */ \
|
||||
asm(".intel_syntax noprefix\n" /* this is in intel syntax */ \
|
||||
".text\n" \
|
||||
".align 2\n" \
|
||||
".if " #n " < 10\n" \
|
||||
".globl " SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase5Stub" #n "Ev@4\n" \
|
||||
".def " SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase5Stub" #n "Ev@4\n" \
|
||||
".globl _ZN14nsXPTCStubBase5Stub" #n "Ev@4\n" \
|
||||
".def _ZN14nsXPTCStubBase5Stub" #n "Ev@4\n" \
|
||||
".scl 3\n" /* private */ \
|
||||
".type 46\n" /* function returning unsigned int */ \
|
||||
".endef\n" \
|
||||
SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase5Stub" #n "Ev@4:\n" \
|
||||
"_ZN14nsXPTCStubBase5Stub" #n "Ev@4:\n" \
|
||||
".elseif " #n " < 100\n" \
|
||||
".globl " SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase6Stub" #n "Ev@4\n" \
|
||||
".def " SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase6Stub" #n "Ev@4\n" \
|
||||
".globl _ZN14nsXPTCStubBase6Stub" #n "Ev@4\n" \
|
||||
".def _ZN14nsXPTCStubBase6Stub" #n "Ev@4\n" \
|
||||
".scl 3\n" /* private */\
|
||||
".type 46\n" /* function returning unsigned int */ \
|
||||
".endef\n" \
|
||||
SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase6Stub" #n "Ev@4:\n" \
|
||||
"_ZN14nsXPTCStubBase6Stub" #n "Ev@4:\n" \
|
||||
".elseif " #n " < 1000\n" \
|
||||
".globl " SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase7Stub" #n "Ev@4\n" \
|
||||
".def " SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase7Stub" #n "Ev@4\n" \
|
||||
".globl _ZN14nsXPTCStubBase7Stub" #n "Ev@4\n" \
|
||||
".def _ZN14nsXPTCStubBase7Stub" #n "Ev@4\n" \
|
||||
".scl 3\n" /* private */ \
|
||||
".type 46\n" /* function returning unsigned int */ \
|
||||
".endef\n" \
|
||||
SYMBOL_UNDERSCORE "_ZN14nsXPTCStubBase7Stub" #n "Ev@4:\n" \
|
||||
"_ZN14nsXPTCStubBase7Stub" #n "Ev@4:\n" \
|
||||
".else\n" \
|
||||
".err \"stub number " #n " >= 1000 not yet supported\"\n" \
|
||||
".endif\n" \
|
||||
|
|
Загрузка…
Ссылка в новой задаче