2011-12-12 21:14:40 +00:00
|
|
|
//==- HexagonInstrFormats.td - Hexagon Instruction Formats --*- tablegen -*-==//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file describes the Hexagon V4 instruction classes in TableGen format.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2012-05-03 16:18:50 +00:00
|
|
|
//----------------------------------------------------------------------------//
|
2014-05-08 18:47:08 +00:00
|
|
|
// Hexagon Instruction Flags
|
2012-05-03 16:18:50 +00:00
|
|
|
//
|
|
|
|
// *** Must match BaseInfo.h ***
|
|
|
|
//----------------------------------------------------------------------------//
|
|
|
|
|
2013-02-14 19:57:17 +00:00
|
|
|
def TypeMEMOP : IType<9>;
|
|
|
|
def TypeNV : IType<10>;
|
|
|
|
def TypePREFIX : IType<30>;
|
2012-05-03 16:18:50 +00:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------------//
|
2014-05-08 18:47:08 +00:00
|
|
|
// Instruction Classes Definitions
|
2012-05-03 16:18:50 +00:00
|
|
|
//----------------------------------------------------------------------------//
|
|
|
|
|
2011-12-12 21:14:40 +00:00
|
|
|
//
|
|
|
|
// NV type instructions.
|
|
|
|
//
|
2013-02-14 19:57:17 +00:00
|
|
|
class NVInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-08 18:47:08 +00:00
|
|
|
string cstr = "", InstrItinClass itin = NCJ_tc_3or4stall_SLOT0>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeNV>;
|
2013-02-14 19:57:17 +00:00
|
|
|
|
|
|
|
class NVInst_V4<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-08 18:47:08 +00:00
|
|
|
string cstr = "", InstrItinClass itin = NCJ_tc_3or4stall_SLOT0>
|
|
|
|
: NVInst<outs, ins, asmstr, pattern, cstr, itin>;
|
2011-12-12 21:14:40 +00:00
|
|
|
|
|
|
|
// Definition of Post increment new value store.
|
2013-02-14 19:57:17 +00:00
|
|
|
class NVInstPost_V4<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-08 18:47:08 +00:00
|
|
|
string cstr = "", InstrItinClass itin = ST_tc_st_SLOT0>
|
|
|
|
: NVInst<outs, ins, asmstr, pattern, cstr, itin>;
|
2011-12-12 21:14:40 +00:00
|
|
|
|
|
|
|
// Post increment ST Instruction.
|
2013-01-29 18:42:41 +00:00
|
|
|
let mayStore = 1 in
|
|
|
|
class NVInstPI_V4<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-08 18:47:08 +00:00
|
|
|
string cstr = "", InstrItinClass itin = ST_tc_st_SLOT0>
|
|
|
|
: NVInst<outs, ins, asmstr, pattern, cstr, itin>;
|
2013-02-14 19:57:17 +00:00
|
|
|
|
|
|
|
// New-value conditional branch.
|
|
|
|
class NCJInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "">
|
|
|
|
: NVInst<outs, ins, asmstr, pattern, cstr>;
|
|
|
|
|
|
|
|
let mayLoad = 1, mayStore = 1 in
|
|
|
|
class MEMInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-08 18:47:08 +00:00
|
|
|
string cstr = "", InstrItinClass itin = V4LDST_tc_st_SLOT0>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeMEMOP>;
|
2013-02-14 19:57:17 +00:00
|
|
|
|
|
|
|
class MEMInst_V4<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-08 18:47:08 +00:00
|
|
|
string cstr = "", InstrItinClass itin = V4LDST_tc_st_SLOT0>
|
|
|
|
: MEMInst<outs, ins, asmstr, pattern, cstr, itin>;
|
2012-05-03 16:18:50 +00:00
|
|
|
|
2012-12-20 06:45:39 +00:00
|
|
|
let isCodeGenOnly = 1 in
|
|
|
|
class EXTENDERInst<dag outs, dag ins, string asmstr, list<dag> pattern = []>
|
2014-05-08 18:47:08 +00:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, "", EXTENDER_tc_1_SLOT0123,
|
|
|
|
TypePREFIX>;
|