Skip to content

Commit

Permalink
pc: Add store and load operations.
Browse files Browse the repository at this point in the history
  • Loading branch information
surovic committed Jun 10, 2024
1 parent 0f32d58 commit 0046e0c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions include/patchestry/Dialect/Pcode/PcodeOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,23 @@ def ReturnOp
let assemblyFormat = [{ $varnode attr-dict `:` type(operands) }];
}

def StoreOp
: Pcode_Op< "store" >
, Arguments<( ins Builtin_Integer:$addr_space, Builtin_Integer:$addr, Builtin_Integer:$data )>
{
let summary = "Pcode STORE operation";
let description = "TODO(surovic)";
let assemblyFormat = [{ $addr_space `,` $addr `,` $data attr-dict `:` type(operands) }];
}

def LoadOp
: Pcode_Op< "load" >
, Arguments<( ins Builtin_Integer:$addr_space, Builtin_Integer:$addr )>
, Results<( outs Builtin_Integer:$result )>
{
let summary = "Pcode LOAD operation";
let description = "TODO(surovic)";
let assemblyFormat = [{ $addr_space `,` $addr attr-dict `:` functional-type(operands, results) }];
}

#endif // PCODE_DIALECT_OPS

0 comments on commit 0046e0c

Please sign in to comment.