<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""></blockquote></div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 6, 2019, at 12:57 PM, Nicolas Cellier <<a href="mailto:notifications@github.com" class="">notifications@github.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p class="">For passing parameters by value, my understanding is that we can pass up to 8 <em class="">eigthbytes</em> individually for each struct (either via register if struct fits on two eightbytes, and if we still have available registers, or via stack...). Only for more than 8 eightbytes, we will pass by MEMORY (a pointer to struct).</p><p class="">Here is a little example:</p>
<pre class=""><code class="">double adi(sdi x) { return (double) x.a + (double) x.b ; }
double adi_2(sdi x,sdi y) { return adi(x) + adi(y); }
double adi_4(sdi x,sdi y,sdi z,sdi t) { return adi_2(x,y) + adi_2(z,t); }

double aslf(sslf x) { return (double) x.a + (double) x.b + (double) x.c ; }
double aslf_2(sslf x,sslf y) { return aslf(x) + aslf(y); }
double aslf_4(sslf x,sslf y,sslf z,sslf t) { return aslf_2(x,y) + aslf_2(z,t); }
</code></pre><p class="">double-int are passed by registers (by value) because fitting on 2 eightbytes<br class="">
short-long-float are passed via stack (by value) because requiring 3 eightbytes<br class="">
We should try longer (> 8 eightbytes) and verify that they are passed by pointer...</p><p style="font-size:small;-webkit-text-size-adjust:none;color:#666;" class="">—<br class="">You are receiving this because you are subscribed to this thread.<br class="">Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/443?email_source=notifications&email_token=AIJPEW3KXWHZHIYSFPN56DDQSMVU3A5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDH6XYY#issuecomment-550497251" class="">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW6526SF2E4V5NDITSTQSMVU3ANCNFSM4JJ3EAUQ" class="">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEW3UIJEUJEEJPQA4VSDQSMVU3A5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDH6XYY.gif" height="1" width="1" alt="" class=""></p>
</div></blockquote></div><br class=""></div></body></html>