Differences From Artifact [8ed55a5c76]:
- File
src/invocation/invoke-x86_64.m
— part of check-in
[d6e5e6beb3]
at
2017-09-14 21:51:51
on branch trunk
— apple-call-x86_64.S: Add support for stret and jmp
Jumping is useful in case of forwarding, so that the return value does
not need to be put back into an OFInvocation and then from an
OFInvocation back into registers. (user: js, size: 6904) [annotate] [blame] [check-ins using]
To Artifact [75aba7c79f]:
- File src/invocation/invoke-x86_64.m — part of check-in [1b96a21136] at 2017-09-15 00:03:02 on branch trunk — invoke-x86_64.m: Add support for __int128 (user: js, size: 7129) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
147 148 149 150 151 152 153 154 155 156 157 158 159 160 | CASE_GPR('I', unsigned int) CASE_GPR('s', short) CASE_GPR('S', unsigned short) CASE_GPR('l', long) CASE_GPR('L', unsigned long) CASE_GPR('q', long long) CASE_GPR('Q', unsigned long long) case 'f':; float floatTmp; [invocation getArgument: &floatTmp atIndex: i]; pushDouble(&context, ¤tSSE, floatTmp); break; case 'd':; | > > > > > > > > > > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | CASE_GPR('I', unsigned int) CASE_GPR('s', short) CASE_GPR('S', unsigned short) CASE_GPR('l', long) CASE_GPR('L', unsigned long) CASE_GPR('q', long long) CASE_GPR('Q', unsigned long long) #ifdef __SIZEOF_INT128__ case 't': case 'T':; uint64_t int128Tmp[2]; [invocation getArgument: int128Tmp atIndex: i]; pushGPR(&context, ¤tGPR, int128Tmp[0]); pushGPR(&context, ¤tGPR, int128Tmp[1]); break; #endif case 'f':; float floatTmp; [invocation getArgument: &floatTmp atIndex: i]; pushDouble(&context, ¤tSSE, floatTmp); break; case 'd':; |
︙ | ︙ | |||
177 178 179 180 181 182 183 | /* TODO: '[' */ /* TODO: '{' */ /* TODO: '(' */ CASE_GPR('^', uintptr_t) #ifndef __STDC_NO_COMPLEX__ /* TODO: 'j' */ #endif | < < < < | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | /* TODO: '[' */ /* TODO: '{' */ /* TODO: '(' */ CASE_GPR('^', uintptr_t) #ifndef __STDC_NO_COMPLEX__ /* TODO: 'j' */ #endif default: free(context); @throw [OFInvalidFormatException exception]; #undef CASE_GPR } } |
︙ | ︙ | |||
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | case 'I': case 's': case 'S': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'B': case '*': case '@': case '#': case ':': case '^': context->return_type = RETURN_TYPE_NORMAL; break; case 'D': context->return_type = RETURN_TYPE_X87; break; /* TODO: '[' */ /* TODO: '{' */ /* TODO: '(' */ #ifndef __STDC_NO_COMPLEX__ /* TODO: 'j' */ #endif | > > > > < < < < | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | case 'I': case 's': case 'S': case 'l': case 'L': case 'q': case 'Q': #ifdef __SIZEOF_INT128__ case 't': case 'T': #endif case 'f': case 'd': case 'B': case '*': case '@': case '#': case ':': case '^': context->return_type = RETURN_TYPE_NORMAL; break; case 'D': context->return_type = RETURN_TYPE_X87; break; /* TODO: '[' */ /* TODO: '{' */ /* TODO: '(' */ #ifndef __STDC_NO_COMPLEX__ /* TODO: 'j' */ #endif default: free(context); @throw [OFInvalidFormatException exception]; } of_invocation_call(context); |
︙ | ︙ | |||
252 253 254 255 256 257 258 259 260 261 262 263 264 265 | CASE_GPR('I', unsigned int) CASE_GPR('s', short) CASE_GPR('S', unsigned short) CASE_GPR('l', long) CASE_GPR('L', unsigned long) CASE_GPR('q', long long) CASE_GPR('Q', unsigned long long) case 'f':; float floatTmp; _mm_store_ss(&floatTmp, context->sse[0]); [invocation setReturnValue: &floatTmp]; break; case 'd':; double doubleTmp; | > > > > > > | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | CASE_GPR('I', unsigned int) CASE_GPR('s', short) CASE_GPR('S', unsigned short) CASE_GPR('l', long) CASE_GPR('L', unsigned long) CASE_GPR('q', long long) CASE_GPR('Q', unsigned long long) #ifdef __SIZEOF_INT128__ case 't': case 'T':; [invocation setReturnValue: &context->gpr[NUM_GPR_IN]]; break; #endif case 'f':; float floatTmp; _mm_store_ss(&floatTmp, context->sse[0]); [invocation setReturnValue: &floatTmp]; break; case 'd':; double doubleTmp; |
︙ | ︙ | |||
277 278 279 280 281 282 283 | /* TODO: '[' */ /* TODO: '{' */ /* TODO: '(' */ CASE_GPR('^', uintptr_t) #ifndef __STDC_NO_COMPLEX__ /* TODO: 'j' */ #endif | < < < < | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | /* TODO: '[' */ /* TODO: '{' */ /* TODO: '(' */ CASE_GPR('^', uintptr_t) #ifndef __STDC_NO_COMPLEX__ /* TODO: 'j' */ #endif default: free(context); @throw [OFInvalidFormatException exception]; #undef CASE_GPR } free(context); } |