Changeset 16396 in vbox for trunk/src/libs/xpcom18a4/xpcom
- Timestamp:
- Jan 29, 2009 11:38:53 PM (16 years ago)
- Location:
- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix
- Files:
-
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_darwin.cpp
r16389 r16396 56 56 // - 'gpregs[]' contains the arguments passed in integer registers 57 57 // - 'fpregs[]' contains the arguments passed in floating point registers 58 // 58 // 59 59 // The parameters are mapped into an array of type 'nsXPTCMiniVariant' 60 60 // and then the method gets called. … … 105 105 const nsXPTType& type = param.GetType(); 106 106 nsXPTCMiniVariant* dp = &dispatchParams[i]; 107 107 108 108 if (!param.IsOut() && type == nsXPTType::T_DOUBLE) { 109 109 if (nr_fpr < FPR_COUNT) … … 165 165 166 166 #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ 167 // Linux/x86-64 uses gcc >= 3.1167 // Darwin/AMD64 uses gcc >= 3.1 168 168 #define STUB_ENTRY(n) \ 169 asm(". section \".text\"\n\t" \169 asm(".text\n\t" \ 170 170 ".align 2\n\t" \ 171 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" \172 ".globl __ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \ 173 /*".type __ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n"*/ \ 174 "__ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \ 175 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" \176 ".globl __ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \ 177 /*".type __ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n"*/ \ 178 "__ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \ 179 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" \180 ".globl __ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \ 181 /*".type __ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n"*/ \ 182 "__ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \ 183 183 ".else\n\t" \ 184 184 ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \ … … 187 187 "jmp SharedStub\n\t" \ 188 188 ".if " #n " < 10\n\t" \ 189 ".size _ZN14nsXPTCStubBase5Stub" #n "Ev,.-_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t"\189 /*".size __ZN14nsXPTCStubBase5Stub" #n "Ev,.-__ZN14nsXPTCStubBase5Stub" #n "Ev\n\t"*/ \ 190 190 ".elseif " #n " < 100\n\t" \ 191 ".size _ZN14nsXPTCStubBase6Stub" #n "Ev,.-_ZN14nsXPTCStubBase6Stub" #n "Ev\n\t"\191 /*".size __ZN14nsXPTCStubBase6Stub" #n "Ev,.-__ZN14nsXPTCStubBase6Stub" #n "Ev\n\t"*/ \ 192 192 ".else\n\t" \ 193 ".size _ZN14nsXPTCStubBase7Stub" #n "Ev,.-_ZN14nsXPTCStubBase7Stub" #n "Ev\n\t"\193 /*".size __ZN14nsXPTCStubBase7Stub" #n "Ev,.-__ZN14nsXPTCStubBase7Stub" #n "Ev\n\t"*/ \ 194 194 ".endif"); 195 195 196 // static nsresult SharedStub(PRUint32 methodIndex) 197 asm(". section \".text\"\n\t"196 // static nsresult SharedStub(PRUint32 methodIndex) [methodIndex is in eax]. 197 asm(".text\n\t" 198 198 ".align 2\n\t" 199 ".type SharedStub,@function\n\t" 199 /* ".type SharedStub,@function\n\t" */ 200 200 "SharedStub:\n\t" 201 201 // make room for gpregs (48), fpregs (64) … … 224 224 "movl %eax,%esi\n\t" 225 225 "leaq 16(%rbp),%rdx\n\t" 226 "call PrepareAndDispatch@plt\n\t"226 "call _PrepareAndDispatch\n\t" 227 227 "leave\n\t" 228 228 "ret\n\t" 229 ".size SharedStub,.-SharedStub"); 229 /* ".size SharedStub,.-SharedStub" */ 230 ); 230 231 231 232 #define SENTINEL_ENTRY(n) \ … … 239 240 240 241 #else 241 #error "Unsupported compiler. Use gcc >= 3.1 for Linux/x86-64."242 #error "Unsupported compiler. Use gcc >= 3.1 for Darwin/AMD64." 242 243 #endif /* __GNUC__ */
Note:
See TracChangeset
for help on using the changeset viewer.