<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 --- - __attribute__((interrupt)) trashes MMX registers"
href="https://llvm.org/bugs/show_bug.cgi?id=26411">26411</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__attribute__((interrupt)) trashes MMX 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>All
</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>hjl.tools@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>kevin.b.smith@intel.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>[hjl@gnu-6 interrupt-8]$ cat z.i
typedef short __v4hi __attribute__ ((__vector_size__ (8)));
typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__));
extern __m64 y, x;
void
__attribute__((interrupt))
fn1 (void *frame)
{
x = (__m64) __builtin_ia32_packsswb ((__v4hi) x, (__v4hi) y);
}
[hjl@gnu-6 interrupt-8]$ make z.s
/export/build/gnu/llvm-clang-bootstrap/stage1/build-x86_64-linux/bin/clang -O2
-Wall -march=nehalem -S -o z.s z.i
[hjl@gnu-6 interrupt-8]$ cat z.s
.text
.file "z.i"
.globl fn1
.p2align 4, 0x90
.type fn1,@function
fn1: # @fn1
.cfi_startproc
# BB#0:
movq x(%rip), %mm0
packsswb y(%rip), %mm0
movq %mm0, x(%rip)
iretq
.Lfunc_end0:
.size fn1, .Lfunc_end0-fn1
.cfi_endproc
.ident "clang version 3.9.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
1f64ddbc4c5d1036b68ec896765a7535537ded85) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
43b517fe4e0a181b1cf20f36fd9eb92f7b32946c)"
.section ".note.GNU-stack","",@progbits
[hjl@gnu-6 interrupt-8]$
Interrupt handler must preserve MMX and X87 states. It shouldn't be
allowed to use MMX nor x87 registers.</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>