Pegmatite
 All Classes Functions Variables Enumerations
Public Member Functions | Public Attributes | List of all members
AST::Arithmetic Struct Reference

Arithmetic nodes, for example '+ a0 12' (add the value 12 to register a0). More...

#include <ast.hh>

Inheritance diagram for AST::Arithmetic:
Inheritance graph
[legend]
Collaboration diagram for AST::Arithmetic:
Collaboration graph
[legend]

Public Member Functions

virtual uint16_t interpret (Interpreter::State &) override
 Interpret this node, updating the given interpreter step and returning the value (if there is one).
 
virtual llvm::Value * compile (Compiler::State &) override
 Compile this node, returning the LLVM value representing the result, if there is one.
 

Public Attributes

pegmatite::ASTPtr< Opop
 The operation to perform.
 
pegmatite::ASTPtr< Registertarget
 The target register. More...
 
pegmatite::ASTPtr< Statementvalue
 The value to assign to the register.
 

Detailed Description

Arithmetic nodes, for example '+ a0 12' (add the value 12 to register a0).

Definition at line 216 of file ast.hh.

Member Data Documentation

pegmatite::ASTPtr<Register> AST::Arithmetic::target

The target register.

All operations in the cellatom language are read-modify-write.

Definition at line 226 of file ast.hh.


The documentation for this struct was generated from the following files: