mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
[mips] Implement ehb, ssnop, and pause in assembler
Summary: Add negative tests for pause Reviewers: matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D3246 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -818,3 +818,14 @@ class CMov_F_F_FM<bits<5> fmt, bit tf> : StdArch {
|
||||
let Inst{10-6} = fd;
|
||||
let Inst{5-0} = 0x11;
|
||||
}
|
||||
|
||||
class BARRIER_FM<bits<5> op> : StdArch {
|
||||
bits<32> Inst;
|
||||
|
||||
let Inst{31-26} = 0; // SPECIAL
|
||||
let Inst{25-21} = 0;
|
||||
let Inst{20-16} = 0; // rt = 0
|
||||
let Inst{15-11} = 0; // rd = 0
|
||||
let Inst{10-6} = op; // Operation
|
||||
let Inst{5-0} = 0; // SLL
|
||||
}
|
||||
|
||||
@@ -1161,6 +1161,12 @@ def MTC0 : MFC3OP<"mtc0", GPR32Opnd>, MFC3OP_FM<0x10, 4>;
|
||||
def MFC2 : MFC3OP<"mfc2", GPR32Opnd>, MFC3OP_FM<0x12, 0>;
|
||||
def MTC2 : MFC3OP<"mtc2", GPR32Opnd>, MFC3OP_FM<0x12, 4>;
|
||||
|
||||
class Barrier<string asmstr> : InstSE<(outs), (ins), asmstr, [], NoItinerary,
|
||||
FrmOther>;
|
||||
def SSNOP : Barrier<"ssnop">, BARRIER_FM<1>;
|
||||
def EHB : Barrier<"ehb">, BARRIER_FM<3>;
|
||||
def PAUSE : Barrier<"pause">, BARRIER_FM<5>, Requires<[HasMips32r2]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Instruction aliases
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user