1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
Issuetracker : #i56947#
CWS : N/A
Author : <maho@openoffice.org> (JCA)
Description : FreeBSD porting : update files at bridges project
catch up version up of bridge project of GNU/Linux
--- bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Thu Sep 8 07:20:08 2005
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Wed Oct 26 15:10:05 2005
@@ -57,7 +57,7 @@
typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
sal_Int32 nParams, typelib_MethodParameter * pParams,
void ** pCallStack,
- sal_Int64 * pRegisterReturn /* space for register return */ )
+ void * pReturnValue )
{
// pCallStack: ret, [return ptr], this, params
char * pCppStack = (char *)(pCallStack +1);
@@ -74,7 +74,7 @@
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
{
- pUnoReturn = pRegisterReturn; // direct way for simple types
+ pUnoReturn = pReturnValue; // direct way for simple types
}
else // complex return via ptr (pCppReturn)
{
@@ -215,7 +215,7 @@
uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
}
// complex return ptr is set to eax
- *(void **)pRegisterReturn = pCppReturn;
+ *static_cast< void ** >(pReturnValue) = pCppReturn;
}
if (pReturnTypeDescr)
{
@@ -228,7 +228,7 @@
//==================================================================================================
extern "C" void cpp_vtable_call(
int nFunctionIndex, int nVtableOffset, void** pCallStack,
- sal_Int64 nRegReturn )
+ void * pReturnValue )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
@@ -275,7 +275,7 @@
pCppI, aMemberDescr.get(),
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
0, 0, // no params
- pCallStack, &nRegReturn );
+ pCallStack, pReturnValue );
}
else
{
@@ -290,7 +290,7 @@
pCppI, aMemberDescr.get(),
0, // indicates void return
1, &aParam,
- pCallStack, &nRegReturn );
+ pCallStack, pReturnValue );
}
break;
}
@@ -324,7 +324,7 @@
&pInterface, pTD, cpp_acquire );
pInterface->release();
TYPELIB_DANGER_RELEASE( pTD );
- *(void **)&nRegReturn = pCallStack[1];
+ *static_cast< void ** >(pReturnValue) = pCallStack[1];
break;
}
TYPELIB_DANGER_RELEASE( pTD );
@@ -336,7 +336,7 @@
((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
- pCallStack, &nRegReturn );
+ pCallStack, pReturnValue );
}
break;
}
--- bridges/source/cpp_uno/gcc3_freebsd_intel/call.s Wed Jun 1 01:32:41 2005
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/call.s Wed Oct 26 15:10:04 2005
@@ -9,12 +9,13 @@
.LCFIg0:
movl %esp,%ebp
.LCFIg1:
- subl $0x8,%esp # 64bit nRegReturn
+ subl $0x4,%esp # 32bit returnValue
+ pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
- movl 12(%esp),%eax # 64 bit nRegReturn, lower half
+ movl 16(%esp),%eax # 32bit returnValue
leave
ret
.LFEg:
@@ -29,7 +30,7 @@
.LCFIv0:
movl %esp,%ebp
.LCFIv1:
- subl $0x8,%esp # 64bit nRegReturn
+ pushl $0 # 32bit null pointer (returnValue not used)
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
@@ -48,13 +49,14 @@
.LCFIh0:
movl %esp,%ebp
.LCFIh1:
- subl $0x8,%esp # 64bit nRegReturn
+ subl $0x8,%esp # 64bit returnValue
+ pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
- movl 12(%esp),%eax # 64 bit nRegReturn, lower half
- movl 16(%esp),%edx # 64 bit nRegReturn, upper half
+ movl 16(%esp),%eax # 64bit returnValue, lower half
+ movl 20(%esp),%edx # 64bit returnValue, upper half
leave
ret
.LFEh:
@@ -69,12 +71,13 @@
.LCFIf0:
movl %esp,%ebp
.LCFIf1:
- subl $0x8,%esp # 64bit nRegReturn
+ subl $0x4,%esp # 32bit returnValue
+ pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
- flds 12(%esp) # 64 bit nRegReturn, lower half
+ flds 16(%esp) # 32bit returnValue
leave
ret
.LFEf:
@@ -89,12 +92,13 @@
.LCFId0:
movl %esp,%ebp
.LCFId1:
- subl $0x8,%esp # 64bit nRegReturn
+ subl $0x8,%esp # 64bit returnValue
+ pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
- fldl 12(%esp) # 64 bit nRegReturn
+ fldl 16(%esp) # 64bit returnValue
leave
ret
.LFEd:
@@ -109,12 +113,13 @@
.LCFIc0:
movl %esp,%ebp
.LCFIc1:
- subl $0x8,%esp # 64bit nRegReturn
+ subl $0x4,%esp # 32bit returnValue
+ pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
- movl 12(%esp),%eax # 64 bit nRegReturn, lower half
+ movl 16(%esp),%eax # 32bit returnValue
leave
ret $4
.LFEc:
|