Changeset 110 for NEWT0/trunk/contrib
- Timestamp:
- 06/03/07 22:31:59 (19 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
NEWT0/trunk/contrib/NewtObjC/objc-runtime-x/objc-runtime-x-i386.s
r61 r110 22 22 /* 23 23 * 2006-06-16 Creation of the file from code of objc-msg-i386.s 24 * 2007-05-30 Replace _objc_methodCallv_stret by _objc_msgSendv_stret based 24 25 */ 25 26 ////////////////////////////////////////////////////////////////////// … … 63 64 marg_size = 16 64 65 marg_list = 20 66 67 struct_addr = 4 68 69 self_stret = 8 70 selector_stret = 12 71 method_stret = 16 72 marg_size_stret = 20 73 marg_list_stret = 24 65 74 66 75 /******************************************************************** … … 121 130 122 131 /******************************************************************** 123 * double objc_methodCallv_stret( 124 id self, 125 SEL _cmd, 126 IMP method, 127 unsigned size, 128 marg_list frame); 132 * void objc_methodCallv_stret( 133 void* stretAddr, 134 id self, 135 SEL _cmd, 136 IMP method, 137 unsigned arg_size, 138 marg_list arg_frame); 129 139 * 130 140 * On entry: 131 * (sp+4) is the message receiver, 132 * (sp+8) is the selector, 133 * (sp+12) is the method to call, 134 * (sp+16) is the size of the marg_list, in bytes, 135 * (sp+20) is the address of the marg_list 141 * (sp+4) is the address in which the returned struct is put, 142 * (sp+8) is the message receiver, 143 * (sp+12) is the selector, 144 * (sp+26) is the method to call, 145 * (sp+20) is the size of the marg_list, in bytes, 146 * (sp+24) is the address of the marg_list 136 147 * 137 148 ********************************************************************/ … … 141 152 pushl %ebp 142 153 movl %esp, %ebp 143 // stack is currently alignedassuming no extra arguments144 movl (marg_list +4)(%ebp), %edx154 subl $12, %esp // align stack assuming no extra arguments 155 movl (marg_list_stret+4)(%ebp), %edx 145 156 addl $8, %edx // skip self & selector 146 movl (marg_size +4)(%ebp), %ecx147 subl $8, %ecx // skip self & selector157 movl (marg_size_stret+4)(%ebp), %ecx 158 subl $5, %ecx // skip self & selector 148 159 shrl $2, %ecx 149 je FpretArgsOK160 je StretArgsOK 150 161 151 162 // %esp = %esp - (16 - ((numVariableArguments & 3) << 2)) … … 156 167 addl %eax, %esp 157 168 158 FpretArgLoop:169 StretArgLoop: 159 170 decl %ecx 160 171 movl 0(%edx, %ecx, 4), %eax 161 172 pushl %eax 162 jg FpretArgLoop173 jg StretArgLoop 163 174 164 FpretArgsOK:165 movl (selector +4)(%ebp), %ecx175 StretArgsOK: 176 movl (selector_stret+4)(%ebp), %ecx 166 177 pushl %ecx 167 movl (self +4)(%ebp),%ecx178 movl (self_stret+4)(%ebp),%ecx 168 179 pushl %ecx 169 movl (method+4)(%ebp),%ecx 180 movl (struct_addr+4)(%ebp),%ecx 181 pushl %ecx 182 movl (method_stret+4)(%ebp),%ecx 170 183 call %ecx 171 184 movl %ebp,%esp
