зеркало из https://github.com/mozilla/pjs.git
Bug 674012 - Remove checks for HAVE_GCC3_ABI. r=glandium
--HG-- extra : rebase_source : 934fd93abd8678d0215ee8296995cb5b296288bf
This commit is contained in:
Родитель
7bbaadb6c9
Коммит
e10ed7637f
|
@ -377,7 +377,6 @@ GNU_AS = @GNU_AS@
|
|||
GNU_LD = @GNU_LD@
|
||||
GNU_CC = @GNU_CC@
|
||||
GNU_CXX = @GNU_CXX@
|
||||
HAVE_GCC3_ABI = @HAVE_GCC3_ABI@
|
||||
HAVE_OLD_CLANG = @HAVE_OLD_CLANG@
|
||||
INTEL_CC = @INTEL_CC@
|
||||
INTEL_CXX = @INTEL_CXX@
|
||||
|
|
23
configure.in
23
configure.in
|
@ -3644,7 +3644,6 @@ dnl ========================================================
|
|||
AC_LANG_CPLUSPLUS
|
||||
|
||||
ARM_ABI_PREFIX=
|
||||
HAVE_GCC3_ABI=
|
||||
if test "$GNU_CC"; then
|
||||
if test "$CPU_ARCH" = "arm" ; then
|
||||
AC_CACHE_CHECK(for ARM EABI,
|
||||
|
@ -3667,26 +3666,8 @@ if test "$GNU_CC"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for gcc 3.0 ABI,
|
||||
ac_cv_gcc_three_abi,
|
||||
[AC_TRY_COMPILE([],
|
||||
[
|
||||
#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
|
||||
return 0;
|
||||
#else
|
||||
#error Not gcc3.
|
||||
#endif
|
||||
],
|
||||
ac_cv_gcc_three_abi="yes",
|
||||
ac_cv_gcc_three_abi="no")])
|
||||
if test "$ac_cv_gcc_three_abi" = "yes"; then
|
||||
TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
|
||||
HAVE_GCC3_ABI=1
|
||||
else
|
||||
TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc2}"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(HAVE_GCC3_ABI)
|
||||
|
||||
dnl Check for support of modern template specialization syntax
|
||||
dnl Test code and requirement from scc@netscape.com.
|
||||
|
@ -7403,7 +7384,7 @@ fi
|
|||
|
||||
# Demangle only for debug or trace-malloc builds
|
||||
MOZ_DEMANGLE_SYMBOLS=
|
||||
if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
|
||||
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
|
||||
MOZ_DEMANGLE_SYMBOLS=1
|
||||
AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
|
||||
fi
|
||||
|
@ -7412,7 +7393,7 @@ AC_SUBST(MOZ_DEMANGLE_SYMBOLS)
|
|||
dnl ========================================================
|
||||
dnl = Support for gcc stack unwinding (from gcc 3.3)
|
||||
dnl ========================================================
|
||||
if test "$HAVE_GCC3_ABI" -a -z "$SKIP_LIBRARY_CHECKS"; then
|
||||
if test -z "$SKIP_LIBRARY_CHECKS"; then
|
||||
MOZ_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
|
||||
fi
|
||||
|
||||
|
|
|
@ -206,7 +206,6 @@ GNU_AS = @GNU_AS@
|
|||
GNU_LD = @GNU_LD@
|
||||
GNU_CC = @GNU_CC@
|
||||
GNU_CXX = @GNU_CXX@
|
||||
HAVE_GCC3_ABI = @HAVE_GCC3_ABI@
|
||||
INTEL_CC = @INTEL_CC@
|
||||
INTEL_CXX = @INTEL_CXX@
|
||||
|
||||
|
|
|
@ -3499,7 +3499,6 @@ dnl ========================================================
|
|||
AC_LANG_CPLUSPLUS
|
||||
|
||||
ARM_ABI_PREFIX=
|
||||
HAVE_GCC3_ABI=
|
||||
if test "$GNU_CC"; then
|
||||
if test "$CPU_ARCH" = "arm" ; then
|
||||
AC_CACHE_CHECK(for ARM EABI,
|
||||
|
@ -3522,26 +3521,8 @@ if test "$GNU_CC"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for gcc 3.0 ABI,
|
||||
ac_cv_gcc_three_abi,
|
||||
[AC_TRY_COMPILE([],
|
||||
[
|
||||
#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
|
||||
return 0;
|
||||
#else
|
||||
#error Not gcc3.
|
||||
#endif
|
||||
],
|
||||
ac_cv_gcc_three_abi="yes",
|
||||
ac_cv_gcc_three_abi="no")])
|
||||
if test "$ac_cv_gcc_three_abi" = "yes"; then
|
||||
TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
|
||||
HAVE_GCC3_ABI=1
|
||||
else
|
||||
TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc2}"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(HAVE_GCC3_ABI)
|
||||
|
||||
dnl Check for support of modern template specialization syntax
|
||||
dnl Test code and requirement from scc@netscape.com.
|
||||
|
@ -4660,7 +4641,7 @@ fi
|
|||
|
||||
# Demangle only for debug or trace-malloc builds
|
||||
MOZ_DEMANGLE_SYMBOLS=
|
||||
if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
|
||||
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
|
||||
MOZ_DEMANGLE_SYMBOLS=1
|
||||
AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
|
||||
fi
|
||||
|
@ -4669,7 +4650,7 @@ AC_SUBST(MOZ_DEMANGLE_SYMBOLS)
|
|||
dnl ========================================================
|
||||
dnl = Support for gcc stack unwinding (from gcc 3.3)
|
||||
dnl ========================================================
|
||||
if test "$HAVE_GCC3_ABI" -a -z "$SKIP_LIBRARY_CHECKS"; then
|
||||
if test -z "$SKIP_LIBRARY_CHECKS"; then
|
||||
AC_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
|
||||
fi
|
||||
|
||||
|
|
|
@ -341,9 +341,6 @@ endif
|
|||
ifeq ($(OS_ARCH),Darwin)
|
||||
ifeq ($(TARGET_CPU), powerpc)
|
||||
ASFLAGS += -x assembler-with-cpp # assumes $(AS) == $(CC)
|
||||
ifdef HAVE_GCC3_ABI
|
||||
ASFLAGS += -DHAVE_GCC3_ABI
|
||||
endif
|
||||
CPPSRCS := xptcinvoke_ppc_rhapsody.cpp xptcstubs_ppc_rhapsody.cpp
|
||||
ASFILES := xptcinvoke_asm_ppc_rhapsody.s xptcstubs_asm_ppc_darwin.s
|
||||
endif
|
||||
|
@ -367,11 +364,7 @@ endif
|
|||
ifeq ($(OS_ARCH),Linux)
|
||||
ifneq (,$(findstring sparc,$(OS_TEST)))
|
||||
CPPSRCS := xptcinvoke_sparc_solaris.cpp xptcstubs_sparc_solaris.cpp
|
||||
ifdef HAVE_GCC3_ABI
|
||||
ASFILES := xptcinvoke_asm_sparc_linux_GCC3.s xptcstubs_asm_sparc_solaris.s
|
||||
else
|
||||
ASFILES := xptcinvoke_asm_sparc_linux.s xptcstubs_asm_sparc_solaris.s
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
#
|
||||
|
@ -408,12 +401,8 @@ CPPSRCS := xptcinvoke_sparc_solaris.cpp xptcstubs_sparc_solaris.cpp
|
|||
endif
|
||||
|
||||
ifeq ($(GNU_CC),1)
|
||||
ifdef HAVE_GCC3_ABI
|
||||
ASFILES := xptcinvoke_asm_sparc_solaris_GCC3.s xptcstubs_asm_sparc_solaris.s
|
||||
else
|
||||
ASFILES := xptcinvoke_asm_sparc_solaris_GCC.s xptcstubs_asm_sparc_solaris.s
|
||||
endif
|
||||
else
|
||||
|
||||
ifdef HAVE_64BIT_OS
|
||||
ASFILES := xptcinvoke_asm_sparcv9_solaris_SUNW.s xptcstubs_asm_sparcv9_solaris.s
|
||||
|
|
|
@ -115,9 +115,6 @@ __NS_InvokeByIndex_P:
|
|||
lwz r4,0(r3) ; get vTable from 'that'
|
||||
lwz r5,172(r31) ; methodIndex
|
||||
slwi r5,r5,2 ; methodIndex * 4
|
||||
#ifndef HAVE_GCC3_ABI
|
||||
addi r5,r5,8 ; (methodIndex * 4) + 8
|
||||
#endif
|
||||
lwzx r12,r5,r4 ; get function pointer
|
||||
|
||||
lwz r4,28(r1)
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
.global NS_InvokeByIndex_P
|
||||
/*
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 16),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 16
|
||||
mov %i2,%o0 ! paramCount
|
||||
call invoke_count_words ! returns the required stack size in %o0
|
||||
mov %i3,%o1 ! params
|
||||
|
||||
sll %o0,2,%l0 ! number of bytes
|
||||
sub %sp,%l0,%sp ! create the additional stack space
|
||||
|
||||
mov %sp,%o0 ! pointer for copied args
|
||||
add %o0,72,%o0 ! step past the register window, the
|
||||
! struct result pointer and the 'this' slot
|
||||
mov %i2,%o1 ! paramCount
|
||||
call invoke_copy_to_stack
|
||||
mov %i3,%o2 ! params
|
||||
!
|
||||
! calculate the target address from the vtable
|
||||
!
|
||||
add %i1,1,%i1 ! vTable is zero-based, index is 1 based (?)
|
||||
ld [%i0],%l1 ! *that --> vTable
|
||||
sll %i1,2,%i1 ! 32 bit pointer
|
||||
add %i1,%l1,%l1 ! vTable[index * 4], l1 now points to vTable entry
|
||||
ld [%l1 + 4],%l0 ! target address
|
||||
|
||||
.L5: ld [%sp + 88],%o5
|
||||
.L4: ld [%sp + 84],%o4
|
||||
.L3: ld [%sp + 80],%o3
|
||||
.L2: ld [%sp + 76],%o2
|
||||
.L1: ld [%sp + 72],%o1
|
||||
.L0:
|
||||
jmpl %l0,%o7 ! call the routine
|
||||
! always have a 'this', from the incoming 'that'
|
||||
mov %i0,%o0
|
||||
|
||||
mov %o0,%i0 ! propagate return value
|
||||
ret
|
||||
restore
|
|
@ -1,87 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
.global NS_InvokeByIndex_P
|
||||
/*
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
mov %i2,%o0 ! paramCount
|
||||
call invoke_count_words ! returns the required stack size in %o0
|
||||
mov %i3,%o1 ! params
|
||||
|
||||
sll %o0,2,%l0 ! number of bytes
|
||||
sub %sp,%l0,%sp ! create the additional stack space
|
||||
|
||||
mov %sp,%o0 ! pointer for copied args
|
||||
add %o0,72,%o0 ! step past the register window, the
|
||||
! struct result pointer and the 'this' slot
|
||||
mov %i2,%o1 ! paramCount
|
||||
call invoke_copy_to_stack
|
||||
mov %i3,%o2 ! params
|
||||
!
|
||||
! calculate the target address from the vtable
|
||||
!
|
||||
add %i1,1,%i1 ! vTable is zero-based, index is 1 based (?)
|
||||
ld [%i0],%l1 ! *that --> vTable
|
||||
sll %i1,3,%i1
|
||||
add %i1,%l1,%l1 ! vTable[index * 8], l1 now points to vTable entry
|
||||
lduh [%l1],%l0 ! this adjustor
|
||||
sll %l0,16,%l0 ! sign extend to 32 bits
|
||||
sra %l0,16,%l0
|
||||
add %l0,%i0,%i0 ! adjust this
|
||||
ld [%l1 + 4],%l0 ! target address
|
||||
|
||||
.L5: ld [%sp + 88],%o5
|
||||
.L4: ld [%sp + 84],%o4
|
||||
.L3: ld [%sp + 80],%o3
|
||||
.L2: ld [%sp + 76],%o2
|
||||
.L1: ld [%sp + 72],%o1
|
||||
.L0:
|
||||
jmpl %l0,%o7 ! call the routine
|
||||
! always have a 'this', from the incoming 'that'
|
||||
mov %i0,%o0
|
||||
|
||||
mov %o0,%i0 ! propagate return value
|
||||
ret
|
||||
restore
|
|
@ -47,8 +47,7 @@ define(STUB_MANGLED_ENTRY,
|
|||
b _SharedStub')
|
||||
dnl
|
||||
define(STUB_ENTRY,
|
||||
`#ifdef HAVE_GCC3_ABI
|
||||
.if '$1` < 10
|
||||
` .if '$1` < 10
|
||||
STUB_MANGLED_ENTRY('$1`, `__ZN14nsXPTCStubBase5Stub'$1`Ev')
|
||||
.elseif '$1` < 100
|
||||
STUB_MANGLED_ENTRY('$1`, `__ZN14nsXPTCStubBase6Stub'$1`Ev')
|
||||
|
@ -57,9 +56,6 @@ STUB_MANGLED_ENTRY('$1`, `__ZN14nsXPTCStubBase7Stub'$1`Ev')
|
|||
.else
|
||||
.err "Stub'$1` >= 1000 not yet supported."
|
||||
.endif
|
||||
#else /* !defined(HAVE_GCC3_ABI) */
|
||||
STUB_MANGLED_ENTRY('$1`, `_Stub'$1`__14nsXPTCStubBase')
|
||||
#endif /* !defined(HAVE_GCC3_ABI) */
|
||||
')
|
||||
dnl
|
||||
define(SENTINEL_ENTRY, `')
|
||||
|
|
Загрузка…
Ссылка в новой задаче