Bug 684659 - Drop xptc_platforms_unixish_x86.h. r=bsmedberg.

Drop MOZ_PRESERVE_PIC which is not used since 2002,
CFRONT_STYLE_THIS_ADJUST which was used only for really old systems
like the first Freebsd 5.

With those out, the only thing left in xptc_platforms_unixish_x86.h is
to set KEEP_STACK_16_BYTE_ALIGNED for QNX, since that is not supported
and KEEP_STACK_16_BYTE_ALIGNED can be set from Makefile.in if needed,
drop xptc_platforms_unixish_x86.h completely.
This commit is contained in:
Rafael Ávila de Espíndola 2011-09-14 11:38:07 -07:00
Родитель 245d670b85
Коммит 3b86f7c833
8 изменённых файлов: 0 добавлений и 210 удалений

Просмотреть файл

@ -39,7 +39,6 @@
#include "xptcprivate.h"
#include "xptiprivate.h"
#include "xptc_platforms_unixish_x86.h"
#include "xptc_gcc_x86_unix.h"
extern "C" {

Просмотреть файл

@ -1,173 +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) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 #defines to be shared by the various platforms sharing
* the unixish_86 code
*/
/*
* The goal here is to clearly define the binary compatibility parameters for
* the platforms that will use this code. Rather than switch at compile time
* based on the compiler that happens to be in use we are forcing implementors
* to make a conscious decision.
*
* For some of these platforms the community may choose to have more than one
* binary model in effect. In that case I suggest that there be explicit sub
* defines for that platform specifying 'TYPE1', 'TYPE2', etc. The decision on
* which 'TYPE' to use would be triggered by a setting passed through from the
* config system.
*
* For example we might end up with something like:
*
* #elif defined(NTO)
* # if defined(TYPE1)
* # define CFRONT_STYLE_THIS_ADJUST
* # elif defined(TYPE2)
* # define THUNK_BASED_THIS_ADJUST
* # else
* # error "need TYPE1 or TYPE2 for NTO"
* # endif
*
* and so on....
*
*/
#if defined(LINUX) || (defined(__GLIBC__) && (defined(__FreeBSD_kernel__) || defined(__GNU__)))
#if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
/* Old gcc 2.7.x.x. What does gcc 2.8.x do?? */
#define CFRONT_STYLE_THIS_ADJUST
#else
/* egcs and later */
#define THUNK_BASED_THIS_ADJUST
#endif
#elif defined(__FreeBSD__)
/* System versions of gcc on FreeBSD don't use thunks. On 3.x, the system
* compiler is gcc 2.7.2.3, which doesn't use thunks by default. On 4.x and
* 5.x, /usr/src/contrib/gcc/config/freebsd.h explicitly undef's
* DEFAULT_VTABLE_THUNKS. (The one exception is a brief period (September
* 1999 - Jan 2000) during 4.0-CURRENT, after egcs was merged --
* this was changed before 4.0-RELEASE, but we can handle it anyway.)
*
* Versions of gcc from the ports collection (/usr/ports/lang/egcs),
* however, have DEFAULT_VTABLE_THUNKS #defined to 1, at least
* in all ports collections since the 2.95 merge. (Supporting optional
* compilers from FreeBSD 3.2 or earlier seems unnecessary).
*
* The easiest way to distinguish the ports collection gcc from the system
* gcc is that the system gcc defines __FreeBSD_cc_version. This variable
* can also identify versions that use thunks. This includes some 4.x versions
* and now newer 5.x versions.
*/
#if defined(__FreeBSD_cc_version) && \
(__FreeBSD_cc_version < 500003) && \
(__FreeBSD_cc_version < 400002 || __FreeBSD_cc_version > 400003)
#define CFRONT_STYLE_THIS_ADJUST
#else
#define THUNK_BASED_THIS_ADJUST
#endif
#elif defined(__NetBSD__)
#define THUNK_BASED_THIS_ADJUST
#elif defined(__OpenBSD__)
#if __GNUC__ >= 3
#define THUNK_BASED_THIS_ADJUST
#else
/* OpenBSD introduces GCC 2.95.x in late May 1999 */
#include <sys/param.h>
#if OpenBSD <= 199905
#define THUNK_BASED_THIS_ADJUST
#else
#define CFRONT_STYLE_THIS_ADJUST
#endif
#endif
#elif defined(__bsdi__)
#include <sys/param.h>
#if _BSDI_VERSION >= 199910
/* BSDI/4.1 ships with egcs, ergo thunk-based */
#define THUNK_BASED_THIS_ADJUST
#else
#define CFRONT_STYLE_THIS_ADJUST
#endif
#elif defined(NTO)
#if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
/* Old gcc 2.7.x.x. What does gcc 2.8.x do?? */
#define CFRONT_STYLE_THIS_ADJUST
#else
/* egcs and later */
#define THUNK_BASED_THIS_ADJUST
#endif
#elif defined(__sun__) || defined(__sun)
#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
#define THUNK_BASED_THIS_ADJUST
#else
#define CFRONT_STYLE_THIS_ADJUST
#endif
#elif defined(_WIN32)
#define THUNK_BASED_THIS_ADJUST
#elif defined(__OS2__)
#define THUNK_BASED_THIS_ADJUST
#elif defined (__APPLE__) && (__MACH__)
#define THUNK_BASED_THIS_ADJUST
#else
#error "need a platform define if using unixish x86 code"
#endif
/***************************************************************************/
#if !defined(THUNK_BASED_THIS_ADJUST) && !defined(CFRONT_STYLE_THIS_ADJUST)
#error "need to define 'this' adjust scheme"
#endif
#if defined(THUNK_BASED_THIS_ADJUST) && defined(CFRONT_STYLE_THIS_ADJUST)
#error "need to define only ONE 'this' adjust scheme"
#endif
#if defined(__QNXNTO__)
/* Define KEEP_STACK_16_BYTE_ALIGNED if the stack needs to maintain alignment
* in a CALL for some good reason (like ABI compliance). */
#define KEEP_STACK_16_BYTE_ALIGNED
#endif

Просмотреть файл

@ -38,7 +38,6 @@
/* Platform specific code to invoke XPCOM methods on native objects */
#include "xptcprivate.h"
#include "xptc_platforms_unixish_x86.h"
#include "xptc_gcc_x86_unix.h"
extern "C" {
@ -81,11 +80,6 @@ invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d)
paramCount = ebp + 0x10
params = ebp + 0x14
NOTE NOTE NOTE:
As of 2002-04-29 this function references no global variables nor does
it call non-static functions so preserving and loading the PIC register
is unnecessary. Define MOZ_PRESERVE_PIC if this changes. See mozilla
bug 140412 for details. However, avoid this if you can. It's slower.
*/
/*
* Hack for gcc for win32 and os2. Functions used externally must be
@ -119,16 +113,6 @@ __asm__ (
#endif
"pushl %ebp\n\t"
"movl %esp, %ebp\n\t"
#ifdef MOZ_PRESERVE_PIC
"pushl %ebx\n\t"
"call 0f\n\t"
".subsection 1\n"
"0:\n\t"
"movl (%esp), %ebx\n\t"
"ret\n\t"
".previous\n\t"
"addl $_GLOBAL_OFFSET_TABLE_, %ebx\n\t"
#endif
"movl 0x10(%ebp), %eax\n\t"
"leal 0(,%eax,8),%edx\n\t"
"movl %esp, %ecx\n\t"
@ -150,26 +134,11 @@ __asm__ (
"movl 0x14(%ebp), %edx\n\t"
"call " SYMBOL_UNDERSCORE "invoke_copy_to_stack\n\t"
"movl 0x08(%ebp), %ecx\n\t" /* 'that' */
#ifdef CFRONT_STYLE_THIS_ADJUST
"movl (%ecx), %edx\n\t"
"movl 0x0c(%ebp), %eax\n\t" /* function index */
"shll $3, %eax\n\t" /* *= 8 */
"addl $8, %eax\n\t" /* += 8 skip first entry */
"addl %eax, %edx\n\t"
"movswl (%edx), %eax\n\t" /* 'this' offset */
"addl %eax, %ecx\n\t"
"pushl %ecx\n\t"
"addl $4, %edx\n\t" /* += 4, method pointer */
#else /* THUNK_BASED_THIS_ADJUST */
"pushl %ecx\n\t"
"movl (%ecx), %edx\n\t"
"movl 0x0c(%ebp), %eax\n\t" /* function index */
"leal (%edx,%eax,4), %edx\n\t"
#endif
"call *(%edx)\n\t"
#ifdef MOZ_PRESERVE_PIC
"movl -4(%ebp), %ebx\n\t"
#endif
"movl %ebp, %esp\n\t"
"popl %ebp\n\t"
"ret\n"

Просмотреть файл

@ -39,7 +39,6 @@
/* Platform specific code to invoke XPCOM methods on native objects */
#include "xptcprivate.h"
#include "xptc_platforms_unixish_x86.h"
extern "C" {

Просмотреть файл

@ -39,7 +39,6 @@
/* Platform specific code to invoke XPCOM methods on native objects */
#include "xptcprivate.h"
#include "xptc_platforms_unixish_x86.h"
extern "C" {

Просмотреть файл

@ -39,7 +39,6 @@
#include "xptcprivate.h"
#include "xptiprivate.h"
#include "xptc_platforms_unixish_x86.h"
#include "xptc_gcc_x86_unix.h"
extern "C" {

Просмотреть файл

@ -38,7 +38,6 @@
/* Implement shared vtbl methods. */
#include "xptcprivate.h"
#include "xptc_platforms_unixish_x86.h"
#include "xptiprivate.h"
static nsresult

Просмотреть файл

@ -40,7 +40,6 @@
#include "xptcprivate.h"
#include "xptiprivate.h"
#include "xptc_platforms_unixish_x86.h"
nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)