<html>
<head>
<base href="http://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 --- - AsmParser::parseDirectiveMacro can't parse recursive macro definition"
href="http://llvm.org/bugs/show_bug.cgi?id=18599">18599</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>AsmParser::parseDirectiveMacro can't parse recursive macro definition
</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>Linux
</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>MC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>manjian2006@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>Created <span class=""><a href="attachment.cgi?id=11929" name="attach_11929" title="source that cause bug">attachment 11929</a> <a href="attachment.cgi?id=11929&action=edit" title="source that cause bug">[details]</a></span>
source that cause bug
libjpeg_turbo/simd/jsimd_arm_neon.S defines a macro like this:
.macro generate_jsimd_rgb_ycc_convert_neon colorid, bpp, r_offs, g_offs, b_offs
/*
* 2 stage pipelined RGB->YCbCr conversion
*/
.macro do_rgb_to_yuv_stage1
...
.endm // do_rgb_to_yuv_stage1 ends
.macro do_rgb_to_yuv_stage2
...
.endm // generate_jsimd_rgb_ycc_convert_neon ends
and this is how AsmParser::parseDirectiveMacro handle it :
// Lex the macro definition.
for (;;) {
// Check whether we have reached the end of the file.
if (getLexer().is(AsmToken::Eof))
return Error(DirectiveLoc, "no matching '.endmacro' in definition");
// Otherwise, check whether we have reach the .endmacro.
if (getLexer().is(AsmToken::Identifier) &&
(getTok().getIdentifier() == ".endm" ||
=> getTok().getIdentifier() == ".endmacro")) {
EndToken = getTok();
Lex();
if (getLexer().isNot(AsmToken::EndOfStatement))
return TokError("unexpected token in '" + EndToken.getIdentifier() +
"' directive");
break;
}
that apparently have not consider the situation where n macro define
recursively.
that make BodyStart points to ".macro do_rgb_to_yuv_stage1",whereas BodyEnd
points to ".endm // do_rgb_to_yuv_stage1 ends"
This should be fixed.</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>