The 'mul' line of the test is temporarily commented out because it currently matches the MIPS32 mul instead of the MIPS32r6 mul. This line will be uncommented when we disable the MIPS32 mul on MIPS32r6.
Details
Diff Detail
Event Timeline
lib/Target/Mips/Mips32r6InstrFormats.td | ||
---|---|---|
20 | I would like to move this MipsR6Inst base class to be inherited by *_DESC_BASE classes in Mips32r2InstrInfo.td, because when I'm trying to do something like this: class BRANCH_DESC_BASE<string instr_asm, DAGOperand opnd> { ... let isBranch = 1; ... } let isBranch = 1; So I would like to do this: ... } Mips32r6InstInfo.td: ... } class MUL_R6_DESC_BASE<string instr_asm, RegisterOperand GPROpnd> : MipsR6Inst { ... } |
lib/Target/Mips/Mips32r6InstrFormats.td | ||
---|---|---|
20 | Unfortunately deriving the *_DESC classes from MipsR6Inst has other problems. It overrides the changes specified by the *_ENC classes, resetting the encodings to zero. This should do what you want: class BRANCH_DESC_BASE<string instr_asm, DAGOperand opnd> { ... bit isBranch = 1; ... } |
lib/Target/Mips/Mips32r6InstrFormats.td | ||
---|---|---|
20 | I just changed 'let isBranch = 1;' to 'bit isBranch = 1;', now everything is fine. |
lib/Target/Mips/Mips32r6InstrInfo.td | ||
---|---|---|
74 | Is it possible, at least for some instructions, to use "_DESC" classes from MIPS32 instructions descriptions? |
lib/Target/Mips/Mips32r6InstrInfo.td | ||
---|---|---|
74 | It should be possible. If we are going to merge them, we should probably do so when we add codegen support |
I've just re-tested this and 'mul $2,$3,$4' has started matching the old 'mul' instruction instead of the new one. This patch is the bottleneck for the rest of the branch so for now, I'm going to comment out the 'mul' line and I will restore it when we disable the old mul in MIPS32r6/MIPS64r6.
I would like to move this MipsR6Inst base class to be inherited by *_DESC_BASE classes in Mips32r2InstrInfo.td, because when I'm trying to do something like this:
class BRANCH_DESC_BASE<string instr_asm, DAGOperand opnd> {
}
I'm receiving an error message:
llvm/lib/Target/Mips/Mips32r6InstrInfo.td:88:18: error: Value 'isBranch' unknown!
So I would like to do this:
Mips32r6InstFormats.td:
class SPECIAL_3R_FM<bits<5> mulop, bits<6> funct> {
}
Mips32r6InstInfo.td:
class BRANCH_DESC_BASE<string instr_asm, DAGOperand opnd> : MipsR6Inst {
}
class MUL_R6_DESC_BASE<string instr_asm, RegisterOperand GPROpnd> : MipsR6Inst {
}