CPU
INCLUDE FILE
#include "CPU.h"
class CPU
Represents a CPU, which defines its instruction sets, its syntax and encoding.
DEFINITION
class CPU;
method add_addressing_modeprivate
DEFINITION
| void add_addressing_mode | ( | Symbol name, | |
| AddressingMode addressing_mode | ); |
| PARAMETER | DESCRIPTION |
|---|---|
name |
|
addressing_mode |
method add_argument_typeprivate
DEFINITION
| void add_argument_type | ( | Symbol name, | |
| std::unique_ptr< ArgumentType > argument_type | ); |
| PARAMETER | DESCRIPTION |
|---|---|
name |
|
argument_type |
method add_punctuationprivate
DEFINITION
| void add_punctuation | ( | Symbol name | ); |
| PARAMETER | DESCRIPTION |
|---|---|
name |
method add_reserved_wordprivate
DEFINITION
| void add_reserved_word | ( | Symbol word | ); |
| PARAMETER | DESCRIPTION |
|---|---|
word |
method addressing_modeconst
DEFINITION
| const AddressingMode * addressing_mode | ( | Symbol name | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
name |
| RETURNS | DESCRIPTION |
|---|---|
const AddressingMode * |
method argument_typeconst
DEFINITION
| const ArgumentType * argument_type | ( | Symbol name | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
name |
| RETURNS | DESCRIPTION |
|---|---|
const ArgumentType * |
method getstatic
DEFINITION
| static const CPU & get | ( | Symbol name, | |
| Symbol base = {} | ); |
| PARAMETER | DESCRIPTION |
|---|---|
name |
|
base |
| RETURNS | DESCRIPTION |
|---|---|
const CPU & |
method instructionconst
DEFINITION
| const Instruction * instruction | ( | Symbol name | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
name |
| RETURNS | DESCRIPTION |
|---|---|
const Instruction * |
method is_compatible_withconst
DEFINITION
| bool is_compatible_with | ( | const CPU & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method match_addressing_modesconst
DEFINITION
| std::vector< AddressingModeMatcherResult > match_addressing_modes | ( | const std::vector< std::shared_ptr< Node > > & arguments | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
arguments |
| RETURNS | DESCRIPTION |
|---|---|
std::vector< AddressingModeMatcherResult > |
method setupconst
DEFINITION
| void setup | ( | FileTokenizer & tokenizer | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
tokenizer |
method uses_bracesconst
DEFINITION
| bool uses_braces | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method uses_empty_mnemonicconst
DEFINITION
| bool uses_empty_mnemonic | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method uses_punctuationconst
DEFINITION
| bool uses_punctuation | ( | Symbol symbol | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
symbol |
| RETURNS | DESCRIPTION |
|---|---|
bool |
member CPUParserprivate
DEFINITION
friend CPUParser;
member addressing_mode_matcherprivate
DEFINITION
AddressingModeMatcher addressing_mode_matcher;
member addressing_modesprivate
DEFINITION
std::unordered_map< Symbol, AddressingMode > addressing_modes;
member argument_typesprivate
DEFINITION
std::unordered_map< Symbol, std::unique_ptr< ArgumentType > > argument_types;
member byte_order
DEFINITION
uint64_t byte_order;
member emptystatic
DEFINITION
static const CPU empty;
member instructionsprivate
DEFINITION
std::unordered_map< Symbol, Instruction > instructions;
member punctuationprivate
DEFINITION
std::unordered_set< Symbol > punctuation;
member reserved_wordsprivate
DEFINITION
std::unordered_set< Symbol > reserved_words;