[llvm-dev] target porting : objdump is not giving proper registers.

Mahesh Bodapati via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 12 09:37:01 PST 2017


Hi Tim,
Thanks for your observations.It seems I have missed adding encoding values
for registers.

Thanks,
Mahesh B

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Dec 11, 2017 at 1:27 PM, Tim Northover <t.p.northover at gmail.com>
wrote:

> Hi Mahesh,
>
> On 11 December 2017 at 06:41, Mahesh Bodapati via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > we have seen proper register numbers when we have generated assembly
> files
> > through clang but when we generated dump files from object file then we
> didn't see expected
> > register numbers.
>
> I assume this is a backend you're writing? Those encodings have a lot
> of 0s in them, so I'm guessing the object file is what's wrong rather
> than the dumper.
>
> Have you made sure you have fields in your instructions whose names
> match the registers in the (outs) and (ins) and get assigned to the
> "Inst" bitfield? That's how TableGen knows where to encode each
> register.
>
> You should look for calls to getMachineOpValue in
> build/lib/Target/XYZ/XYZGenMCCodeEmitter.inc, both in the source and
> with a debugger to make sure it's actually being called and doing what
> you expect.
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171212/f5ea7b9a/attachment.html>


More information about the llvm-dev mailing list