These instructions are available in ISAs >= mips32/mips64. For mips32r6/mips64r6, jr.hb has a new encoding format.
Details
Diff Detail
Event Timeline
Fields isTerminator and isBarrier should be defined in JR_HB_R6_DESC and not
overriden using let (copy and paste error).
Mostly nits but there's a probable functionality bug too.
lib/Target/Mips/Mips32r6InstrInfo.td | ||
---|---|---|
558 | Please rename the def to JR_HB_R6 so that it matches the naming scheme. Also, shouldn't JR_HB_ENC be JR_HB_R6_ENC? | |
lib/Target/Mips/MipsInstrInfo.td | ||
241–244 | The other *_NOT_* adjectives immediately follow the one without the 'NOT'. Could you move it up to line 235? | |
1281–1308 | In the long term, I'm in favour of moving to this style and naming convention throughout the MIPS tablegen files. However, I've been trying to stay consistent within this file for now since we will be able to identify old-style definitions by their name. I think it would be better to rename these to match the style used in the rest of this file. | |
1310–1311 | Please add the underscores to the def name. | |
1340 | Shouldn't this be a ISA_MIPS32_NOT_32R6_64R6? | |
test/MC/Mips/mips32r2/invalid.s | ||
10–11 | Just for consistency with the other files, could you put the ASM: on the same line as the instruction? Also one nice side effect of doing this is it allows sorting to maintain the correct order. Same for the other invalid.s's. |
lib/Target/Mips/Mips32r6InstrInfo.td | ||
---|---|---|
558 |
Are you suggesting I should rename JR_H_ENC to JR_HB_R6_ENC or are you actually asking if JR_HB_ENC is the right encoding format ? JR_HB_ENC is JR_HB_R6_FM<OPCODE6_JALR> and the old encoding (mips32) doesn't use the _ENC naming scheme (because MipsInstrInfo.td doesn't use it). | |
lib/Target/Mips/MipsInstrInfo.td | ||
1340 | jalr.hb didn't change between mips32 and mips32r6 which means this alias remains valid to 32R6 and 64R6. |
- Moved check CHECK lines to the same line as the instruction it's testing
- Updated names (added underscores and _R6 when needed)
- Moved definition of ISA_MIPS32_NOT_32R6_64R6 closer to definition of ISA_MIPS32 as requested
I've just noticed that some of the invalid.s's weren't updated to put the ASM on the same line as the instruction.
Could you fix that?
Please rename the def to JR_HB_R6 so that it matches the naming scheme.
Also, shouldn't JR_HB_ENC be JR_HB_R6_ENC?