[llvm-commits] [Mips] Direct object big endian review and submittal request

Carter, Jack jcarter at mips.com
Mon Jan 9 17:12:45 PST 2012


Rafael,

I'll resubmit with the requested test changes and the subclass suggestion.

The byte swap issue is due to the size of the object. In this case the object is
a 4 byte word that has a 16 bit fixup area. The whole word needs to be re-sexed
rather than just the fixup area.

Jack
________________________________________
From: Rafael Ávila de Espíndola [rafael.espindola at gmail.com]
Sent: Friday, January 06, 2012 8:42 PM
To: Carter, Jack
Cc: bruno.cardoso at gmail.com; Hatanaka, Akira; Kotler, Reed
Subject: Re: [Mips] Direct object big endian review and submittal request

On 05/01/12 09:43 PM, Carter, Jack wrote:
> Please use this attached patch instead of the previous one.
>
> In my initial patch I had 2 parameters reversed. Evidently I ran the
> wrong llc on my final test. I have several source trees and got mixed up.

I looked into it a bit more. The main comment is that it needs more
tests. Make sure there is at least one relocation, so that the bits in
it are tested.

Can you make the test use llvm-mc instead of llc? That is a lot better
for testing the MC infrastructure.

It would be nice if you organized the code a bit more like the other
architectures. Create subclasses of MipsAsmBackend and implement
createObjectWriter in them.

You probably just want

NumBytes = (getFixupKindInfo(Kind).TargetSize+7)/8;

No?

I am not sure I understand why the byte swapping when you are reading an
writing one byte at a time. Again, add some tests that check it.

For reference, I played a bit with the code. The result is attached.

> Thanks,
>
> Jack
>

Cheers,
Rafael




More information about the llvm-commits mailing list