[llvm-dev] ERROR:Segmentation fault

Dylan McKay via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 28 23:20:54 PDT 2016


This is failing because in the file you attached to me you’re defining an
empty register class.

include "llvm/Target/Target.td"

def Abc : Target
{
}

class Reg<string n> : Register<n> {
  let Namespace = "SYMPL";
}

def R1 : Reg<"r1">;

def NOReg : RegisterClass<"SYMPL", [ i32 ], 32, (add R1)>;

Here’s what it looks like when you define a register ‘r1’ and add it to the
register class. I had to add a bunch of stuff at the top to get TableGen to
compile it on its own.

When I run llvm-tblgen -gen-register-info SYMPLRegisterInfo.td it succeeds.
​

On Thu, Sep 29, 2016 at 7:04 PM, Varun Patil via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> please help me guys
>
>
>
>
> Thanks and Regards
> Varun
>
> On Wed, Sep 28, 2016 at 4:59 PM, Varun Patil <varun.patil40 at gmail.com>
> wrote:
>
>> Hi Developer,
>>
>> In my processor I am not using registers so I wrote Simple register.td
>> file with bare minimum functions.
>> But when I am registering my target with llvm it is showing "*Segmentation
>> Fault(core dumped)*" Error and also same error while generating
>> table-gen for asm-writer.
>>
>> Some one told comment out EditRegesterName function. because this error
>> is due to EditRegisterName it seems but where should i comment means in
>> which file should i comment this function Since i am not using it in any of
>> my files.
>>
>> please help me guys.
>>
>>
>> Thanks and Regards
>> Varun
>>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160929/6d22105a/attachment.html>


More information about the llvm-dev mailing list