forked from OSchip/llvm-project
[mips] Move COP2 & COP3 load/store instructions from MipsInstrFPU.td to MipsInstrInfo.td. NFC.
Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5843 llvm-svn: 221300
This commit is contained in:
parent
df6e0d0371
commit
a16974a5c0
|
@ -178,38 +178,6 @@ class SW_FT<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
||||||
let mayStore = 1;
|
let mayStore = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SW_FT2<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
|
||||||
SDPatternOperator OpNode= null_frag> :
|
|
||||||
InstSE<(outs), (ins RC:$rt, mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
|
||||||
[(OpNode RC:$rt, addrDefault:$addr)], Itin, FrmFI, opstr> {
|
|
||||||
let DecoderMethod = "DecodeFMem2";
|
|
||||||
let mayStore = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
class LW_FT2<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
|
||||||
SDPatternOperator OpNode= null_frag> :
|
|
||||||
InstSE<(outs RC:$rt), (ins mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
|
||||||
[(set RC:$rt, (OpNode addrDefault:$addr))], Itin, FrmFI, opstr> {
|
|
||||||
let DecoderMethod = "DecodeFMem2";
|
|
||||||
let mayLoad = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
class SW_FT3<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
|
||||||
SDPatternOperator OpNode= null_frag> :
|
|
||||||
InstSE<(outs), (ins RC:$rt, mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
|
||||||
[(OpNode RC:$rt, addrDefault:$addr)], Itin, FrmFI, opstr> {
|
|
||||||
let DecoderMethod = "DecodeFMem3";
|
|
||||||
let mayStore = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
class LW_FT3<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
|
||||||
SDPatternOperator OpNode= null_frag> :
|
|
||||||
InstSE<(outs RC:$rt), (ins mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
|
||||||
[(set RC:$rt, (OpNode addrDefault:$addr))], Itin, FrmFI, opstr> {
|
|
||||||
let DecoderMethod = "DecodeFMem3";
|
|
||||||
let mayLoad = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
class MADDS_FT<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
class MADDS_FT<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
||||||
SDPatternOperator OpNode = null_frag> :
|
SDPatternOperator OpNode = null_frag> :
|
||||||
InstSE<(outs RC:$fd), (ins RC:$fr, RC:$fs, RC:$ft),
|
InstSE<(outs RC:$fd), (ins RC:$fr, RC:$fs, RC:$ft),
|
||||||
|
@ -436,30 +404,6 @@ def LDC1 : MMRel, LW_FT<"ldc1", AFGR64Opnd, II_LDC1, load>, LW_FM<0x35>,
|
||||||
def SDC1 : MMRel, SW_FT<"sdc1", AFGR64Opnd, II_SDC1, store>, LW_FM<0x3d>,
|
def SDC1 : MMRel, SW_FT<"sdc1", AFGR64Opnd, II_SDC1, store>, LW_FM<0x3d>,
|
||||||
ISA_MIPS2, FGR_32;
|
ISA_MIPS2, FGR_32;
|
||||||
|
|
||||||
// Cop2 Memory Instructions
|
|
||||||
// FIXME: These aren't really FPU instructions and as such don't belong in this
|
|
||||||
// file
|
|
||||||
def LWC2 : LW_FT2<"lwc2", COP2Opnd, NoItinerary, load>, LW_FM<0x32>,
|
|
||||||
ISA_MIPS1_NOT_32R6_64R6;
|
|
||||||
def SWC2 : SW_FT2<"swc2", COP2Opnd, NoItinerary, store>, LW_FM<0x3a>,
|
|
||||||
ISA_MIPS1_NOT_32R6_64R6;
|
|
||||||
def LDC2 : LW_FT2<"ldc2", COP2Opnd, NoItinerary, load>, LW_FM<0x36>,
|
|
||||||
ISA_MIPS2_NOT_32R6_64R6;
|
|
||||||
def SDC2 : SW_FT2<"sdc2", COP2Opnd, NoItinerary, store>, LW_FM<0x3e>,
|
|
||||||
ISA_MIPS2_NOT_32R6_64R6;
|
|
||||||
|
|
||||||
// Cop3 Memory Instructions
|
|
||||||
// FIXME: These aren't really FPU instructions and as such don't belong in this
|
|
||||||
// file
|
|
||||||
let DecoderNamespace = "COP3_" in {
|
|
||||||
def LWC3 : LW_FT3<"lwc3", COP3Opnd, NoItinerary, load>, LW_FM<0x33>;
|
|
||||||
def SWC3 : SW_FT3<"swc3", COP3Opnd, NoItinerary, store>, LW_FM<0x3b>;
|
|
||||||
def LDC3 : LW_FT3<"ldc3", COP3Opnd, NoItinerary, load>, LW_FM<0x37>,
|
|
||||||
ISA_MIPS2;
|
|
||||||
def SDC3 : SW_FT3<"sdc3", COP3Opnd, NoItinerary, store>, LW_FM<0x3f>,
|
|
||||||
ISA_MIPS2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Indexed loads and stores.
|
// Indexed loads and stores.
|
||||||
// Base register + offset register addressing mode (indicated by "x" in the
|
// Base register + offset register addressing mode (indicated by "x" in the
|
||||||
// instruction mnemonic) is disallowed under NaCl.
|
// instruction mnemonic) is disallowed under NaCl.
|
||||||
|
|
|
@ -672,6 +672,40 @@ class StoreLeftRight<string opstr, SDNode OpNode, RegisterOperand RO,
|
||||||
let DecoderMethod = "DecodeMem";
|
let DecoderMethod = "DecodeMem";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// COP2 Load/Store
|
||||||
|
class LW_FT2<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
||||||
|
SDPatternOperator OpNode= null_frag> :
|
||||||
|
InstSE<(outs RC:$rt), (ins mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
||||||
|
[(set RC:$rt, (OpNode addrDefault:$addr))], Itin, FrmFI, opstr> {
|
||||||
|
let DecoderMethod = "DecodeFMem2";
|
||||||
|
let mayLoad = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
class SW_FT2<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
||||||
|
SDPatternOperator OpNode= null_frag> :
|
||||||
|
InstSE<(outs), (ins RC:$rt, mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
||||||
|
[(OpNode RC:$rt, addrDefault:$addr)], Itin, FrmFI, opstr> {
|
||||||
|
let DecoderMethod = "DecodeFMem2";
|
||||||
|
let mayStore = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// COP3 Load/Store
|
||||||
|
class LW_FT3<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
||||||
|
SDPatternOperator OpNode= null_frag> :
|
||||||
|
InstSE<(outs RC:$rt), (ins mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
||||||
|
[(set RC:$rt, (OpNode addrDefault:$addr))], Itin, FrmFI, opstr> {
|
||||||
|
let DecoderMethod = "DecodeFMem3";
|
||||||
|
let mayLoad = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
class SW_FT3<string opstr, RegisterOperand RC, InstrItinClass Itin,
|
||||||
|
SDPatternOperator OpNode= null_frag> :
|
||||||
|
InstSE<(outs), (ins RC:$rt, mem:$addr), !strconcat(opstr, "\t$rt, $addr"),
|
||||||
|
[(OpNode RC:$rt, addrDefault:$addr)], Itin, FrmFI, opstr> {
|
||||||
|
let DecoderMethod = "DecodeFMem3";
|
||||||
|
let mayStore = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Conditional Branch
|
// Conditional Branch
|
||||||
class CBranch<string opstr, DAGOperand opnd, PatFrag cond_op,
|
class CBranch<string opstr, DAGOperand opnd, PatFrag cond_op,
|
||||||
RegisterOperand RO, bit DelaySlot = 1> :
|
RegisterOperand RO, bit DelaySlot = 1> :
|
||||||
|
@ -1150,6 +1184,26 @@ def SWR : StoreLeftRight<"swr", MipsSWR, GPR32Opnd, II_SWR>, LW_FM<0x2e>,
|
||||||
ISA_MIPS1_NOT_32R6_64R6;
|
ISA_MIPS1_NOT_32R6_64R6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// COP2 Memory Instructions
|
||||||
|
def LWC2 : LW_FT2<"lwc2", COP2Opnd, NoItinerary, load>, LW_FM<0x32>,
|
||||||
|
ISA_MIPS1_NOT_32R6_64R6;
|
||||||
|
def SWC2 : SW_FT2<"swc2", COP2Opnd, NoItinerary, store>, LW_FM<0x3a>,
|
||||||
|
ISA_MIPS1_NOT_32R6_64R6;
|
||||||
|
def LDC2 : LW_FT2<"ldc2", COP2Opnd, NoItinerary, load>, LW_FM<0x36>,
|
||||||
|
ISA_MIPS2_NOT_32R6_64R6;
|
||||||
|
def SDC2 : SW_FT2<"sdc2", COP2Opnd, NoItinerary, store>, LW_FM<0x3e>,
|
||||||
|
ISA_MIPS2_NOT_32R6_64R6;
|
||||||
|
|
||||||
|
// COP3 Memory Instructions
|
||||||
|
let DecoderNamespace = "COP3_" in {
|
||||||
|
def LWC3 : LW_FT3<"lwc3", COP3Opnd, NoItinerary, load>, LW_FM<0x33>;
|
||||||
|
def SWC3 : SW_FT3<"swc3", COP3Opnd, NoItinerary, store>, LW_FM<0x3b>;
|
||||||
|
def LDC3 : LW_FT3<"ldc3", COP3Opnd, NoItinerary, load>, LW_FM<0x37>,
|
||||||
|
ISA_MIPS2;
|
||||||
|
def SDC3 : SW_FT3<"sdc3", COP3Opnd, NoItinerary, store>, LW_FM<0x3f>,
|
||||||
|
ISA_MIPS2;
|
||||||
|
}
|
||||||
|
|
||||||
def SYNC : MMRel, SYNC_FT<"sync">, SYNC_FM, ISA_MIPS32;
|
def SYNC : MMRel, SYNC_FT<"sync">, SYNC_FM, ISA_MIPS32;
|
||||||
|
|
||||||
def TEQ : MMRel, TEQ_FT<"teq", GPR32Opnd>, TEQ_FM<0x34>, ISA_MIPS2;
|
def TEQ : MMRel, TEQ_FT<"teq", GPR32Opnd>, TEQ_FM<0x34>, ISA_MIPS2;
|
||||||
|
|
Loading…
Reference in New Issue