Hi Eli,<div><br></div><div>I have tried this, but the resulting tool-chain was broken.</div><div><br></div><div>There are only two references to "CALL64m": the definition in X86Instr64bit.td, and an entry in X86InstrInfo.cpp.</div>
<div>After commenting both out, compilation of a large application fails with:</div><div><br></div><div><div><div>llc: ScheduleDAG.cpp:462: void llvm::ScheduleDAGTopologicalSort::InitDAGTopologicalSorting(): Assertion `Node2Index[SU->NodeNum] > Node2Index[I->getSUnit()->NodeNum] && "Wrong topological sorting"' failed.</div>
</div></div><div><br></div><div>bugpoint produced this minimal example which triggers the problem:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">define ccc void @ArgsFree() nounwind {</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">entry:</font></div><div><font class="Apple-style-span" face="'courier new', monospace">  %0 = load void (i8*)** undef, align 4</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">  call ccc void %0(i8* undef) nounwind</font></div><div><font class="Apple-style-span" face="'courier new', monospace">  unreachable</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">}</font></div></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">Any ideas?</font></div>
<div><br></div><div>- David</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jun 8, 2010 at 4:04 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Tue, Jun 8, 2010 at 2:05 PM, David Meyer <<a href="mailto:pdox@google.com">pdox@google.com</a>> wrote:<br>

> Hi,<br>
> I am attempting to modify LLVM to generate code for an architecture which is<br>
> nearly identical to X86-64, but with a few minor differences.<br>
> In particular, "call" must always have a register operand, and cannot have a<br>
> memory operand. Any ideas on how I can express this rule?<br>
<br>
</div></div>Just get rid of the pattern for matching the CALL64m instruction, or<br>
make it require a target feature your target doesn't have.<br>
<font color="#888888"><br>
-Eli<br>
</font></blockquote></div><br></div>