This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Create microMIPS64r6 subtarget and implement DALIGN, DAUI, DAHI, DATI, DEXT, DEXTM and DEXTU instructions
ClosedPublic

Authored by hvarga on Jul 3 2015, 5:20 AM.

Details

Summary

The patch creates microMIPS64r6 subtarget and implements DALIGN, DAUI, DAHI, DATI, DEXT, DEXTM and DEXTU instructions.

Diff Detail

Event Timeline

hvarga updated this revision to Diff 29010.Jul 3 2015, 5:20 AM
hvarga retitled this revision from to [mips][microMIPS] Create microMIPS64r6 subtarget and impelment DALIGN, DAUI, DAHI, DATI, DEXT, DEXTM and DEXTU instructions.
hvarga updated this object.
hvarga added subscribers: petarj, llvm-commits.
hvarga updated this revision to Diff 29011.Jul 3 2015, 6:00 AM

Added new empty line in valid.s file.

hvarga retitled this revision from [mips][microMIPS] Create microMIPS64r6 subtarget and impelment DALIGN, DAUI, DAHI, DATI, DEXT, DEXTM and DEXTU instructions to [mips][microMIPS] Create microMIPS64r6 subtarget and implement DALIGN, DAUI, DAHI, DATI, DEXT, DEXTM and DEXTU instructions.
dsanders added inline comments.Jul 6 2015, 7:03 AM
lib/Target/Mips/Disassembler/MipsDisassembler.cpp
850

hasMips64r6() isn't needed. The predicates are cumulative so hasMips32r6() is true for MIPS64r6 too.

lib/Target/Mips/MicroMips32r6InstrInfo.td
286

I'm on the fence about this. For consistency with the other namespaces, we shouldn't add '_64r6' but equally more descriptive names are generally a good thing.

lib/Target/Mips/MicroMips64r6InstrFormats.td
2

80 cols?

15

Please use the naming convention we used for MIPS32r6/MIPS64r6.

The prefix should match the major opcode name. Then (where necessary) something to disambiguate variations of the major opcode. Lastly a '_FM' suffix.

For example:

DOUBLE_ADD_UPPER_IMM -> DAUI_FM.
DOUBLE_EXT_BIT_FIELD -> POOL32S_EXTBITS_FM.
CONCAT_EXTRACT -> POOL32S_DALIGN_FM.
lib/Target/Mips/MicroMips64r6InstrInfo.td
2

80 cols?

44

Optional nit: DAHI_DATI_DESC_BASE? It's easier to format when the names aren't so long and we generally don't expand the mnemonic to the words it stands for.

Similarly for the other lengthy *_DESC_BASE's below.

44–46

Indentation

57–58

Indendation

91–101

Why do some of these use StdMMR6Rel and others use R6MM6Rel?

hvarga updated this revision to Diff 29163.Jul 7 2015, 4:35 AM
hvarga marked 9 inline comments as done.

Updated according to the comments from dsanders.

dsanders accepted this revision.Aug 11 2015, 3:36 AM
dsanders edited edge metadata.

LGTM with the '-*- tablegen -*-' issue fixed.

lib/Target/Mips/MicroMips64r6InstrFormats.td
2–3

Unfortunately, this bit needs to be on the first line. It tells emacs (and presumably other editors) what the file format is.

I'd drop the redundant 'Mips64r6' in 'Mips64r6 Instruction Formats'.

lib/Target/Mips/MicroMips64r6InstrInfo.td
3

Likewise

This revision is now accepted and ready to land.Aug 11 2015, 3:36 AM
This revision was automatically updated to reflect the committed changes.