Hi Aries,<div><br></div><div>Thank you for your reply. I understand that the registers you mentioned should not be used at will. The problem I don't understand is why not make these registers <b>unallocatable</b>. Since in X86RegisterInfo.td, only floating point stack registers ST0 to ST7 and status flag registers are defined as not allocatable, while special registers such as ESP/EIP/EBP are defined as <b>allocatable but reserved </b>(in X86RegisterInfo.cpp).</div>

<div><br></div><div>Since these registers also have special usage, why not specify them as <b>unallocatable, instead of allocatable but reserved?</b> I hope I made myself clear. Thanks.</div><div><br></div><div>Regards,</div>

<div>Lei Mou<br><br><div class="gmail_quote">On Wed, Apr 18, 2012 at 12:38 PM, AriesWu <span dir="ltr"><<a href="mailto:dodohack@gmail.com">dodohack@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

such as sp, fp for x86 are reserved registers, it means you should not use it as general purpose.<br><br><div class="gmail_quote"><div><div class="h5">On 18 April 2012 12:09, Lei Mou <span dir="ltr"><<a href="mailto:lei.mou.uu@gmail.com" target="_blank">lei.mou.uu@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi,<div><br></div><div>I'm writing to ask the differences between a "reserved" register and an "unallocable" register. In X86 backend, for example, the stack pointer register and instruction pointer are reserved but allocatable. In the Doxygen document of function llvm::TargetRegisterInfo::getReservedRegs, it says that a reserved register is one that <b>has particular uses and should be considered unavailable at all times. </b>If it is unavailable at all times, why not make such a reserved register unallocatable? Thanks!</div>




<div><br></div><div>Regards,</div><div>Lei Mou</div><font color="#888888"><div><br></div><div><br></div><div><br></div>
</font><br></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Sincerely,<br><br>Aries Wu<br><br>
</font></span></blockquote></div><br></div>