<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - pushf/popw out of sync stack"
href="https://bugs.llvm.org/show_bug.cgi?id=35847">35847</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>pushf/popw out of sync stack
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm-dev@redking.me.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>coby.tayree@intel.com, llvm-bugs@lists.llvm.org, mkuper@google.com, rnk@google.com, vicencb@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Split from <a class="bz_bug_link
bz_status_NEW "
title="NEW - pushf/popf default to wrong operand size in 64-bit with Intel syntax"
href="show_bug.cgi?id=32035#c3">Bug #32035 Comment #3</a>
<span class="quote">> (In reply to Vicente Bergas from <a href="show_bug.cgi?id=35847#c3">comment #3</a>)
> Hello,
> this code:
>
> #include <stdio.h>
> #include <stdint.h>
> int main() {
> uint16_t u16;
> asm(
> "pushf\n"
> "popw %0\n"
> : "=r" (u16)
> );
> printf("0x%04hX\n", u16);
> return(0);
> }
>
> when assembled with clang -S generates
> ...
> pushfq
> popw %ax
> ...
> and the stack size gets out of sync.
> When executing the resulting program it segfaults.
> Tested also in GCC: works fine there.</span ></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>