This is an archive of the discontinued LLVM Phabricator instance.

MIPS32r6 compact indexed jumps
ClosedPublic

Authored by jkolek on May 9 2014, 12:30 PM.

Details

Summary

Implemented *_DESC, *_ENC classes, encoder/decoder methods.

Diff Detail

Event Timeline

jkolek updated this revision to Diff 9269.May 9 2014, 12:30 PM
jkolek retitled this revision from to MIPS32r6 compact indexed branches.
jkolek updated this object.
jkolek edited the test plan for this revision. (Show Details)
jkolek added reviewers: dsanders, vmedic.
jkolek added subscribers: zoran.jovanovic, petarj.
jkolek retitled this revision from MIPS32r6 compact indexed branches to MIPS32r6 compact indexed jumps.May 9 2014, 12:34 PM
dsanders accepted this revision.May 12 2014, 2:40 AM
dsanders edited edge metadata.

LGTM but could you explain the need for the custom instruction decode function? It looks like the usual tablegen-erated one would do the same thing but I'm also expecting the branches to have a couple issues with the tablegen-erated code (because of the 'rs < rt' restrictions and similar).

lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h
105

'MM' suffix in comment

lib/Target/Mips/Mips32r6InstrInfo.td
163

I'm not sure why a custom instruction decode function is necessary. Can you explain?

This revision is now accepted and ready to land.May 12 2014, 2:40 AM
vmedic added inline comments.May 13 2014, 6:16 AM
lib/Target/Mips/Disassembler/MipsDisassembler.cpp
896 ↗(On Diff #9269)

I believe this should be doing a sign extend of the offset value.

jkolek updated this revision to Diff 9381.May 14 2014, 4:31 AM
jkolek edited edge metadata.

Here the method DecodeJumpOffset16 is removed and the DecodeSimm16 is used instead. Also, the MM sufix is removed from the comment in MipsMCCodeEmitter.h.

jkolek closed this revision.May 16 2014, 6:28 AM

Committed revision: 208981.

jkolek added a subscriber: Unknown Object (MLST).Nov 18 2014, 5:51 AM