<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Windows style inline assembly. Problem with not restored registers"
href="https://llvm.org/bugs/show_bug.cgi?id=30389">30389</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Windows style inline assembly. Problem with not restored registers
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>adamf88@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=17263" name="attach_17263" title="Sample code and generated assembly">attachment 17263</a> <a href="attachment.cgi?id=17263&action=edit" title="Sample code and generated assembly">[details]</a></span>
Sample code and generated assembly
Clang has problem with properly handling windows style assembly.
Code in the attachment runs properly if I compile it with Microsoft compiler.
If I compile it with clang then the program crashes.
After some investigations I suppose, clang requires restoring esp registers.
According to this document (
<a href="https://msdn.microsoft.com/en-us/library/k1a8ss06.aspx">https://msdn.microsoft.com/en-us/library/k1a8ss06.aspx</a> ) it is not required for
EAX, EBX, ECX, EDX, ESI, EDI registers
Code compiled in clang compiler revision: r279979 from: <a href="http://llvm.org/builds/">http://llvm.org/builds/</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>