<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 - X86 Asm does not support symbolic names inside address calculation"
href="https://bugs.llvm.org/show_bug.cgi?id=33848">33848</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>X86 Asm does not support symbolic names inside address calculation
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>llvm-as
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andrew.v.tischenko@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>When we deal with complex address expression like
[foo + scale * RAX + RDX]
the current implementation does not support at least the following:
1. The negative number as symbolic name: see PR3367
.set one 1
lea rdx, [rax - one]
2. The scale as symbolic name
.set scale, 4
12345 + scale * RAX + RDX
3. Two different symbolic names in one expression
foo + scale * RAX + RDX
4. It crashes when bogus scale value is used: see PR33661
lea rdx, [rax + -1*rcx]
5. In addition it depends on arguments order
6.1. And there is some "pseudo" interpreter to calculate the primitive
expressions like +, -, *, /, etc. This interpreter has assertion to use
immediates for all ops except plus and minus. As result in ops like [rax - one]
it assumes that rax has value 0 in all cases but why? It seems it's wrong.
6.2. And the second about the same: the assertions should be replaced with
error messages because currently we simply see the compiler crash instead of
any diagnostic.</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>