[llvm-dev] Register Number

Sky Flyer via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 17 08:23:20 PDT 2015


Huh, I found the problem!!
I made a silly mistake, instead of having these lines in my
TestMCCodeEmitter::getMachineOpValue function

    unsigned Reg = MO.getReg();
    unsigned RegNo = CTX.getRegisterInfo()->getEncodingValue(Reg);
    return RegNo;

I was just returning the Reg itself! like this:
    unsigned Reg = MO.getReg();
    return Reg;

Thanks a lot Krzysztof. Without your help I would have sunk into the
TableGen see! :D


On Thu, Sep 17, 2015 at 5:13 PM, Krzysztof Parzyszek <
kparzysz at codeaurora.org> wrote:

> On 9/17/2015 9:31 AM, Sky Flyer wrote:
>
>> Thank you :)
>> If you mean this field, it looks everything is ok:
>> field bits<16> Inst = { 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, Dr{2}, Dr{1},
>> Dr{0}, At{0}, 0, 0 };
>>
>> Is possible that the problem might be on the TestAsmParser.cpp side?
>>
>
> Could you post the entire class that contains this field?
>
>
> -Krzysztof
>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150917/e8acb57a/attachment.html>


More information about the llvm-dev mailing list