diff options
| author | Kai Nacke <kai.nacke@redstar.de> | 2014-04-01 18:35:26 +0000 |
|---|---|---|
| committer | Kai Nacke <kai.nacke@redstar.de> | 2014-04-01 18:35:26 +0000 |
| commit | af47f60f83f7ace790eb8bc50eec37b1516c5ef8 (patch) | |
| tree | a53d1d81b6feb952443d01c6ba659a1a5440e67c /llvm/lib/Target | |
| parent | 101102711df0be1b15afb61c306503590b7e4936 (diff) | |
| download | bcm5719-llvm-af47f60f83f7ace790eb8bc50eec37b1516c5ef8.tar.gz bcm5719-llvm-af47f60f83f7ace790eb8bc50eec37b1516c5ef8.zip | |
[mips] Add Octeon cnMips instructions mtmX and mtpX
Adds the Octeon cnMips instructions "load multiplier register MPLx" and "load product register Px".
Includes tests.
Reviews by: Daniel.Sanders@imgtec.com
llvm-svn: 205343
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Mips/Mips64InstrInfo.td | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsInstrFormats.td | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/Mips64InstrInfo.td b/llvm/lib/Target/Mips/Mips64InstrInfo.td index e44a52e517f..d766a4eacd3 100644 --- a/llvm/lib/Target/Mips/Mips64InstrInfo.td +++ b/llvm/lib/Target/Mips/Mips64InstrInfo.td @@ -257,6 +257,14 @@ let Defs = [HI0, LO0, P0, P1, P2] in def DMUL : ArithLogicR<"dmul", GPR64Opnd, 1, II_DMUL, mul>, ADD_FM<0x1c, 0x03>; +// Move to multiplier/product register +def MTM0 : MoveToLOHI<"mtm0", GPR64Opnd, [MPL0, P0, P1, P2]>, MTMR_FM<0x08>; +def MTM1 : MoveToLOHI<"mtm1", GPR64Opnd, [MPL1, P0, P1, P2]>, MTMR_FM<0x0c>; +def MTM2 : MoveToLOHI<"mtm2", GPR64Opnd, [MPL2, P0, P1, P2]>, MTMR_FM<0x0d>; +def MTP0 : MoveToLOHI<"mtp0", GPR64Opnd, [P0]>, MTMR_FM<0x09>; +def MTP1 : MoveToLOHI<"mtp1", GPR64Opnd, [P1]>, MTMR_FM<0x0a>; +def MTP2 : MoveToLOHI<"mtp2", GPR64Opnd, [P2]>, MTMR_FM<0x0b>; + // Count Ones in a Word/Doubleword def POP : Count1s<"pop", GPR32Opnd>, POP_FM<0x2c>; def DPOP : Count1s<"dpop", GPR64Opnd>, POP_FM<0x2d>; diff --git a/llvm/lib/Target/Mips/MipsInstrFormats.td b/llvm/lib/Target/Mips/MipsInstrFormats.td index 09fcd5ee8ff..5b690ac3b7e 100644 --- a/llvm/lib/Target/Mips/MipsInstrFormats.td +++ b/llvm/lib/Target/Mips/MipsInstrFormats.td @@ -489,6 +489,17 @@ class WAIT_FM : StdArch { let Inst{5-0} = 0x20; } +class MTMR_FM<bits<6> funct> : StdArch { + bits<5> rs; + + bits<32> Inst; + + let Inst{31-26} = 0x1c; + let Inst{25-21} = rs; + let Inst{20-6} = 0; + let Inst{5-0} = funct; +} + class POP_FM<bits<6> funct> : StdArch { bits<5> rd; bits<5> rs; |

