[PATCH] TableGen: Put NoRegAltName up front in RegAltNameIndices

David Siegel david.siegel at artcom.de
Wed Jul 15 11:19:17 PDT 2015


Ping.

Adding @stoklund.

> On 24.06.2015, at 19:38, David Siegel <david.siegel at artcom.de> wrote:
> 
> Ping.
> 
>> On 16.06.2015, at 12:17, David Siegel <david.siegel at artcom.de> wrote:
>> 
>> Hi,
>> 
>> AsmWriterEmitter::EmitGetRegisterName(...) assumes that the special item NoRegAltName is the first item in RegAltNameIndices (see AsmWriterEmitter.cpp:613). If it happens to be second element the namespace is empty and the generated code does not compile. I fixed this by moving the NoRegAltName item up front in CodeGenTarget::ReadRegAltNameIndices().
> 
> To reproduce add this line to any RegisterInfo.td, adjust the namespace and recompile:
> 
> let Namespace = “X86" in { def ABC : RegAltNameIndex; }
> 
> This line succeeds:
> 
> let Namespace = “X86" in { def XYZ : RegAltNameIndex; }
> 
> I verified that the patch is still good. This is my first contribution. Let me know if something is missing.
> 
> Cheers,
> 
> d
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-TableGen-Fix-order-in-RegAltNameIndices.patch
Type: application/octet-stream
Size: 1756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/baf49fdd/attachment.obj>


More information about the llvm-commits mailing list