File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
include/circt/Dialect/RTG/IR Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -55,4 +55,30 @@ def RegisterOpInterface : OpInterface<"RegisterOpInterface"> {
55
55
];
56
56
}
57
57
58
+ def InstructionOpInterface : OpInterface<"InstructionOpInterface"> {
59
+ let description = [{
60
+ This interface should be implemented by operations that represent
61
+ ISA instructions.
62
+ }];
63
+ let cppNamespace = "::circt::rtg";
64
+
65
+ let methods = [
66
+ StaticInterfaceMethod<[{
67
+ Emits a binary representation of the instruction compatible with the
68
+ ISA specification.
69
+ }],
70
+ "void", "printInstructionBinary",
71
+ (ins "llvm::raw_ostream &":$os,
72
+ "llvm::ArrayRef<mlir::Attribute>":$operands)>,
73
+ StaticInterfaceMethod<[{
74
+ Emits the ISA assembly representation of the instruction to the provided
75
+ stream. The format should be the one understood by common assembler
76
+ tools.
77
+ }],
78
+ "void", "printInstructionAssembly",
79
+ (ins "llvm::raw_ostream &":$os,
80
+ "llvm::ArrayRef<mlir::Attribute>":$operands)>,
81
+ ];
82
+ }
83
+
58
84
#endif // CIRCT_DIALECT_RTG_IR_RTGISAASSEMBLYINTERFACES_TD
You can’t perform that action at this time.
0 commit comments