summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsMSAInstrFormats.td
diff options
context:
space:
mode:
authorJack Carter <jack.carter@imgtec.com>2013-09-25 23:50:44 +0000
committerJack Carter <jack.carter@imgtec.com>2013-09-25 23:50:44 +0000
commit42d9ca629934d0c20ac19949399ce4faa9a7bbb3 (patch)
treeaf44743f99083c0ccf579047e07e2f541f3ba1a2 /lib/Target/Mips/MipsMSAInstrFormats.td
parent825e5583b6c3161bb02074dc48cd07dafdf9545c (diff)
downloadllvm-42d9ca629934d0c20ac19949399ce4faa9a7bbb3.tar.gz
llvm-42d9ca629934d0c20ac19949399ce4faa9a7bbb3.tar.bz2
llvm-42d9ca629934d0c20ac19949399ce4faa9a7bbb3.tar.xz
[mips][msa] Direct Object Emission support for the MSA instruction set.
In more detail, this patch adds the ability to parse, encode and decode MSA registers ($w0-$w31). The format of 2RF instructions (MipsMSAInstrFormat.td) was updated so that we could attach a test case to this patch i.e., the test case parses, encodes and decodes 2 MSA instructions. Following patches will add the remainder of the instructions. Note that DecodeMSA128BRegisterClass is missing from MipsDisassembler.td because it's not yet required at this stage and having it would cause a compiler warning (unused function). Patch by Matheus Almeida git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsMSAInstrFormats.td')
-rw-r--r--lib/Target/Mips/MipsMSAInstrFormats.td5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsMSAInstrFormats.td b/lib/Target/Mips/MipsMSAInstrFormats.td
index b011674719..9b63ef02f4 100644
--- a/lib/Target/Mips/MipsMSAInstrFormats.td
+++ b/lib/Target/Mips/MipsMSAInstrFormats.td
@@ -52,8 +52,13 @@ class MSA_2R_FMT<bits<8> major, bits<2> df, bits<6> minor>: MSAInst {
}
class MSA_2RF_FMT<bits<9> major, bits<1> df, bits<6> minor>: MSAInst {
+ bits<5> ws;
+ bits<5> wd;
+
let Inst{25-17} = major;
let Inst{16} = df;
+ let Inst{15-11} = ws;
+ let Inst{10-6} = wd;
let Inst{5-0} = minor;
}