Message288031
| Author |
eryksun |
| Recipients |
Igor Kudrin, christian.heimes, doko, eryksun, mark.dickinson, meador.inge, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware |
| Date |
2017年02月17日.18:06:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1487354768.98.0.539543353446.issue29565@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This issue is more straight-forward than #22273. ISTM, we just have to copy large values. For example, in ffi_call, we'd iterate over the arguments and alloca and memcpy the large values prior to calling ffi_call_AMD64:
case FFI_SYSV:
/* If a single argument takes more than 8 bytes,
then a copy is passed by reference. */
for (unsigned i = 0; i < cif->nargs; i++) {
size_t z = cif->arg_types[i]->size;
if (z > 8) {
void *temp = alloca(z);
memcpy(temp, avalue[i], z);
avalue[i] = temp;
}
}
/*@-usedef@*/
return ffi_call_AMD64(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年02月17日 18:06:09 | eryksun | set | recipients:
+ eryksun, doko, paul.moore, vinay.sajip, mark.dickinson, christian.heimes, tim.golden, meador.inge, zach.ware, steve.dower, Igor Kudrin |
| 2017年02月17日 18:06:08 | eryksun | set | messageid: <1487354768.98.0.539543353446.issue29565@psf.upfronthosting.co.za> |
| 2017年02月17日 18:06:08 | eryksun | link | issue29565 messages |
| 2017年02月17日 18:06:08 | eryksun | create |
|