<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">J. Gareth Moreton <<a href="mailto:gareth@moreton-family.com">gareth@moreton-family.com</a>> schrieb am So., 17. März 2019, 23:27:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I think one of the main issues with intrinsics is that you don't have much control over where results are stored. Unless you're chaining a load of intrinsics together in a mess of function calls in actual parameters, the result is going to have to be stored in a local variable, which even on good days will end up being stored on the stack, and problems can occur if the stack isn't aligned and you're using SSE or AVX instructions. After that, when you call the next intrinsic that uses the result, it will have to recall that data from memory. <br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">And I believe that this is the advantage of intrinsics, because here the compiler *can* decide to use a different register. Especially if the compiler supports instruction scheduling and such. </div><div dir="auto">At work I've worked with AES-NI and I definitively preferred to work with the intrinsics and didn't have to care about what registers to use, because the compiler and optimizer took care of that. </div><div dir="auto">That is something that Pascal should stand for: ease of use. Assembler is not easy to use. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div>
</blockquote></div></div></div>