<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="font-family: Times New Roman; color: #000000; font-size: 16px"><br>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Jia,<br>
<br>
Try this in : lib/Basic/Targets.cpp ~line 4390 <br>
<br>
  virtual bool validateAsmConstraint(const char *&Name,<br>
                                     TargetInfo::ConstraintInfo &Info) const {<br>
    switch (*Name) {<br>
    default:<br>
      return false;<br>
        <br>
    case 'r': // CPU registers.<br>
    case 'd': // Equivalent to "r" unless generating MIPS16 code.<br>
    case 'y': // Equivalent to "r", backwards compatibility only.<br>
    case 'f': // floating-point registers.<br>
    case 'c': // $25 for indirect jumps<br>
    case 'l': // lo register<br>
    case 'x': // hilo register pair<br>
      Info.setAllowsRegister();<br>
      return true;<br>
    case 'R': // An address tha can be sued in a non-macro load or store<br>
      Info.setAllowsMemory();<br>
      return true;<br>
    }<br>
<br>
Jack<br>
<br>
On 02/28/2013 08:12 AM, Jia Liu wrote:> Hi all,<br>
> <br>
> I find clang-mips doesn't support constraint 'R' and I'm trying make<br>
> LLVM/Clang support it.<br>
> I did a little job, but Clang can not generate right code, it use the<br>
> same register in inline asm,<br>
> and the binary will segment fault in MIPS environment.<br>
> <br>
<br>
</div>
</div>
</div>
</div>
</body>
</html>