<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 --- - Intel parser doesn't recognize cmp${cc}ss"
href="https://llvm.org/bugs/show_bug.cgi?id=23455">23455</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Intel parser doesn't recognize cmp${cc}ss
</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>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>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ahmed.bougacha@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Consider:
$ echo 'cmpnless xmm0, xmm1' | ./bin/llvm-mc -x86-asm-syntax=intel
.section __TEXT,__text,regular,pure_instructions
<stdin>:1:1: error: invalid operand for instruction
cmpnless xmm0, xmm1
$ echo 'cmpnless %xmm1, %xmm0' | ./bin/llvm-mc
.section __TEXT,__text,regular,pure_instructions
cmpnless %xmm1, %xmm0
This is an old problem, that is now triggered because we started actually
parsing the cmpCCss forms, rather than just string-replacing the CC to an
immediate (as of r229266).
Here's the relevant part of the matchers:
{ 1170 /* cmp */, X86::CMPSSrr, Convert__Reg1_2__Tie0__Reg1_3__Imm1_0, 0, {
MCK_Imm, MCK_SS, MCK_FR32, MCK_FR32 }, },
And here's the same matcher for AT&T syntax:
{ 1170 /* cmp */, X86::CMPSSrr, Convert__Reg1_3__Tie0__Reg1_2__Imm1_0, 0, {
MCK_Imm, MCK_ss, MCK_FR32, MCK_FR32 }, },
Notice _ss vs _SS: with Intel syntax, when TableGen generates the matcher from
the AsmString, it splits "cmp${cc}ss" into tokens, and the "ss" suffix is
recognized as a register ...the SS segment register.
It should probably know that when the token ("ss") doesn't follow a space, it's
not a register (I can't think of a case where that would make sense).</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>