VirtualBox

Ignore:
Timestamp:
Mar 16, 2012 10:19:28 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
76895
Message:

Config.kmk,xpcom: Solaris 11 / gcc 4.5.2 build fixes.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp

    r40498 r40509  
    4646// caller.  The rest of the parameters are passed in the callers stack
    4747// area.
     48// Solaris does the same, just the assembler may differ.
    4849
    4950const PRUint32 PARAM_BUFFER_COUNT   = 16;
     
    164165}
    165166
     167#include <iprt/cdefs.h>
     168
    166169#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
    167 // Linux/x86-64 uses gcc >= 3.1
    168 #define STUB_ENTRY(n) \
    169 asm(".section   \".text\"\n\t" \
     170// Solaris/x86-64 uses gcc >= 3.1
     171#define STUB_ENTRY(n,m) \
     172asm(".section   .text\n\t" \
    170173    ".align     2\n\t" \
    171     ".if        " #n " < 10\n\t" \
    172     ".globl     _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
    173     ".type      _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n" \
    174     "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \
    175     ".elseif    " #n " < 100\n\t" \
    176     ".globl     _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
    177     ".type      _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n" \
    178     "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \
    179     ".elseif    " #n " < 1000\n\t" \
    180     ".globl     _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
    181     ".type      _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n" \
    182     "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \
    183     ".else\n\t" \
    184     ".err       \"stub number " #n " >= 1000 not yet supported\"\n\t" \
    185     ".endif\n\t" \
     174    ".globl     _ZN14nsXPTCStubBase" #m "Stub" #n "Ev\n\t" \
     175    ".type      _ZN14nsXPTCStubBase" #m "Stub" #n "Ev,@function\n" \
     176    "_ZN14nsXPTCStubBase" #m "Stub" #n "Ev:\n\t" \
    186177    "movl       $" #n ", %eax\n\t" \
    187178    "jmp        SharedStub\n\t" \
    188     ".if        " #n " < 10\n\t" \
    189     ".size      _ZN14nsXPTCStubBase5Stub" #n "Ev,.-_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
    190     ".elseif    " #n " < 100\n\t" \
    191     ".size      _ZN14nsXPTCStubBase6Stub" #n "Ev,.-_ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
    192     ".else\n\t" \
    193     ".size      _ZN14nsXPTCStubBase7Stub" #n "Ev,.-_ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
    194     ".endif");
     179    ".size      _ZN14nsXPTCStubBase" #m "Stub" #n "Ev,.-_ZN14nsXPTCStubBase" #m "Stub" #n "Ev\n\t" \
     180    )
     181
     182#define STUB_ENTRY_10(n10,m) \
     183    STUB_ENTRY(n10##0,m); \
     184    STUB_ENTRY(n10##1,m); \
     185    STUB_ENTRY(n10##2,m); \
     186    STUB_ENTRY(n10##3,m); \
     187    STUB_ENTRY(n10##4,m); \
     188    STUB_ENTRY(n10##5,m); \
     189    STUB_ENTRY(n10##6,m); \
     190    STUB_ENTRY(n10##7,m); \
     191    STUB_ENTRY(n10##8,m); \
     192    STUB_ENTRY(n10##9,m)
     193STUB_ENTRY_10(,5);
     194STUB_ENTRY_10(1,6);
     195STUB_ENTRY_10(2,6);
     196STUB_ENTRY_10(3,6);
     197STUB_ENTRY_10(4,6);
     198STUB_ENTRY_10(5,6);
     199STUB_ENTRY_10(6,6);
     200STUB_ENTRY_10(7,6);
     201STUB_ENTRY_10(8,6);
     202STUB_ENTRY_10(9,6);
     203STUB_ENTRY_10(10,7);
     204STUB_ENTRY_10(11,7);
     205STUB_ENTRY_10(12,7);
     206STUB_ENTRY_10(13,7);
     207STUB_ENTRY_10(14,7);
     208STUB_ENTRY_10(15,7);
     209STUB_ENTRY_10(16,7);
     210STUB_ENTRY_10(17,7);
     211STUB_ENTRY_10(18,7);
     212STUB_ENTRY_10(19,7);
     213STUB_ENTRY_10(20,7);
     214STUB_ENTRY_10(21,7);
     215STUB_ENTRY_10(22,7);
     216STUB_ENTRY_10(23,7);
     217STUB_ENTRY_10(24,7);
     218
    195219
    196220// static nsresult SharedStub(PRUint32 methodIndex)
    197 asm(".section   \".text\"\n\t"
     221asm(".section   .text\n\t"
    198222    ".align     2\n\t"
    199223    ".type      SharedStub,@function\n\t"
     
    229253    ".size      SharedStub,.-SharedStub");
    230254
     255
    231256#define SENTINEL_ENTRY(n) \
    232257nsresult nsXPTCStubBase::Sentinel##n() \
     
    236261}
    237262
    238 #include "xptcstubsdef.inc"
     263SENTINEL_ENTRY(0)
     264SENTINEL_ENTRY(1)
     265SENTINEL_ENTRY(2)
     266SENTINEL_ENTRY(3)
     267SENTINEL_ENTRY(4)
    239268
    240269#else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette