<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I discovered the alignstack(16)
attribute, and am now using this in our code.<br>
<br>
This avoids this crash, and as a bonus, causes the resulting code
to use movapd instead of movupd - so is potentially faster code,
too.<br>
<br>
--<br>
Peter N<br>
<br>
On 20/07/2013 6:08 PM, Peter Newman wrote:<br>
</div>
<blockquote cite="mid:51EA4599.9060204@uformia.com" type="cite">Unfortunately,
I've ran into a second issue where addpd is being performed on
memory that isn't 16 byte aligned. Again, this only happens if the
createJIT OptLevel is set to Default (vs None).
<br>
<br>
According to
<br>
<a class="moz-txt-link-freetext" href="http://www.jaist.ac.jp/iscenter-new/mpc/altix/altixdata/opt/intel/vtune/doc/users_guide/mergedProjects/analyzer_ec/mergedProjects/reference_olh/mergedProjects/instructions/instruct32_hh/vc8a.htm">http://www.jaist.ac.jp/iscenter-new/mpc/altix/altixdata/opt/intel/vtune/doc/users_guide/mergedProjects/analyzer_ec/mergedProjects/reference_olh/mergedProjects/instructions/instruct32_hh/vc8a.htm</a>
<br>
that will cause a GPF.
<br>
<br>
I've attached the LLVM IR and a copy of the Disassembly this
results in. The crash occurs at 00370872
<br>
<br>
At the time of the crash, ESP is set to 0018EEF8 - this results in
a value is not 16 byte aligned. I notice that the offset is
aligned though.
<br>
<br>
The crash occurs on the first instance of addpd applied to the
stack (as I understand ESP is used for).
<br>
<br>
There is also raises the question of would it be worth requiring
alignment of the function stack to improve performance (assuming
movapd is faster then movupd). I'm not expecting LLVM to recognize
this (although it would be neat) but is this something worth
setting ourselves, knowing we're going to be using mostly SSE
instructions? And how would we do that?
<br>
<br>
--
<br>
Peter N
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</body>
</html>