<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Sep 27, 2017, at 8:25 AM, Peter Lawrey <<a href="mailto:peter.lawrey@gmail.com" class="">peter.lawrey@gmail.com</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Perhaps project Valhalla will be a way to return multiple values by having</span><br style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">a composite value type, or panama with it's support for XMM instructions</span><br style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">(or both)</span><br style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><br class=""><div class="">That seems likely; we are aiming in both of those directions,</div><div class="">to support direct programming with AVX-type registers (not</div><div class="">just x86 specific, by the way) and general support for by-value</div><div class="">return of structured objects (starting with "minimal value types").</div><div class=""><br class=""></div><div class="">For now, though, every method is limited to at most 64 bits</div><div class="">of return value "payload", which means that 128-bit operations</div><div class="">need to be split into two method calls, or else buffer their</div><div class="">result into a temp object (e.g., array).  The JIT knows how</div><div class="">to combine two intrinsic calls into a single machine operation,</div><div class="">in some very limited circumstances, notably the classic</div><div class="">"div/rem" instructions.  This technique would probably work</div><div class="">for 64-to-128 multiplies.  (Also AES-128, by the way.)</div><div class=""><br class=""></div><div class="">— John</div></body></html>