This is an archive of the discontinued LLVM Phabricator instance.

[mips] Merge disassemblers into a single implementation.
ClosedPublic

Authored by dsanders on Feb 9 2015, 5:22 AM.

Details

Summary

Currently we have Mips32 and Mips64 disassemblers and this causes the target
triple to affect the disassembly despite all the relevant information being in
the ELF header. These implementations do not need to be separate.

This patch merges them together such that the appropriate tables are checked
for the subtarget (e.g. Mips64 is checked when GP64 is enabled).

Diff Detail

Event Timeline

dsanders updated this revision to Diff 19575.Feb 9 2015, 5:22 AM
dsanders retitled this revision from to [mips] Merge disassemblers into a single implementation..
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added a reviewer: vmedic.
dsanders added a subscriber: Unknown Object (MLST).
vmedic added inline comments.Feb 10 2015, 5:24 AM
test/MC/Disassembler/Mips/mips32r2/valid-mips32r2-le.txt
2

Why using mips64 triple here?

test/MC/Disassembler/Mips/mips32r2/valid-mips32r2.txt
2

Same as above.

test/MC/Disassembler/Mips/mips64r2/valid-mips64r2-el.txt
2

shouldn't it be mips64 triple here?

test/MC/Disassembler/Mips/mips64r2/valid-mips64r2.txt
2

Also here.

dsanders added inline comments.Feb 10 2015, 6:30 AM
test/MC/Disassembler/Mips/mips32r2/valid-mips32r2-le.txt
2

It's to ensure that getting the 'wrong' triple doesn't change behaviour. I suppose we could have a second RUN line to cover both triples.

vmedic accepted this revision.Feb 11 2015, 12:46 AM
vmedic edited edge metadata.

It makes sense to put triples as you did, it just wasn't clear without a comment. LGTM.

This revision is now accepted and ready to land.Feb 11 2015, 12:46 AM
dsanders closed this revision.Feb 11 2015, 3:30 AM

Thanks. I added a comment in the commit.