simulavr
1.1.0
|
#include "decoder.h"
#include "hwstack.h"
#include "flash.h"
#include "hwwado.h"
#include "hwsreg.h"
#include "avrerror.h"
#include "ioregs.h"
Go to the source code of this file.
Enumerations | |
enum | decoder_operand_masks { mask_Rd_2 = 0x0030, mask_Rd_3 = 0x0070, mask_Rd_4 = 0x00f0, mask_Rd_5 = 0x01f0, mask_Rr_3 = 0x0007, mask_Rr_4 = 0x000f, mask_Rr_5 = 0x020f, mask_K_8 = 0x0F0F, mask_K_6 = 0x00CF, mask_k_7 = 0x03F8, mask_k_12 = 0x0FFF, mask_k_22 = 0x01F1, mask_reg_bit = 0x0007, mask_sreg_bit = 0x0070, mask_q_displ = 0x2C07, mask_A_5 = 0x00F8, mask_A_6 = 0x060F } |
Functions | |
static int | n_bit_unsigned_to_signed (unsigned int val, int n) |
static int | get_add_carry (byte res, byte rd, byte rr, int b) |
static int | get_add_overflow (byte res, byte rd, byte rr) |
static int | get_sub_carry (byte res, byte rd, byte rr, int b) |
static int | get_sub_overflow (byte res, byte rd, byte rr) |
static int | get_compare_carry (byte res, byte rd, byte rr, int b) |
static int | get_compare_overflow (byte res, byte rd, byte rr) |
static int | get_rd_2 (word opcode) |
static int | get_rd_3 (word opcode) |
static int | get_rd_4 (word opcode) |
static int | get_rd_5 (word opcode) |
static int | get_rr_3 (word opcode) |
static int | get_rr_4 (word opcode) |
static int | get_rr_5 (word opcode) |
static byte | get_K_8 (word opcode) |
static byte | get_K_6 (word opcode) |
static int | get_k_7 (word opcode) |
static int | get_k_12 (word opcode) |
static int | get_k_22 (word opcode) |
static int | get_reg_bit (word opcode) |
static int | get_sreg_bit (word opcode) |
static int | get_q (word opcode) |
static int | get_A_5 (word opcode) |
static int | get_A_6 (word opcode) |
DecodedInstruction * | lookup_opcode (word opcode, AvrDevice *core) |
Translates an opcode to a instance of DecodedInstruction. More... | |
Definition at line 43 of file decoder.cpp.
|
static |
Definition at line 1935 of file decoder.cpp.
References mask_A_5.
|
static |
Definition at line 1940 of file decoder.cpp.
References mask_A_6.
Definition at line 1781 of file decoder.cpp.
Referenced by avr_op_ADC::operator()(), and avr_op_ADD::operator()().
Definition at line 1789 of file decoder.cpp.
Referenced by avr_op_ADC::operator()(), and avr_op_ADD::operator()().
Definition at line 1813 of file decoder.cpp.
Referenced by avr_op_CP::operator()(), avr_op_CPC::operator()(), and avr_op_CPI::operator()().
Definition at line 1821 of file decoder.cpp.
Referenced by avr_op_CP::operator()(), avr_op_CPC::operator()(), and avr_op_CPI::operator()().
|
static |
Definition at line 1901 of file decoder.cpp.
References mask_k_12.
|
static |
Definition at line 1906 of file decoder.cpp.
References mask_k_22.
Definition at line 1890 of file decoder.cpp.
References mask_K_6.
|
static |
Definition at line 1896 of file decoder.cpp.
References mask_k_7.
Definition at line 1884 of file decoder.cpp.
References mask_K_8.
|
static |
Definition at line 1927 of file decoder.cpp.
References mask_q_displ.
|
static |
Definition at line 1844 of file decoder.cpp.
References mask_Rd_2.
|
static |
Definition at line 1850 of file decoder.cpp.
References mask_Rd_3.
|
static |
Definition at line 1856 of file decoder.cpp.
References mask_Rd_4.
|
static |
Definition at line 1862 of file decoder.cpp.
References mask_Rd_5.
|
static |
Definition at line 1917 of file decoder.cpp.
References mask_reg_bit.
|
static |
Definition at line 1868 of file decoder.cpp.
References mask_Rr_3.
|
static |
Definition at line 1873 of file decoder.cpp.
References mask_Rr_4.
|
static |
Definition at line 1878 of file decoder.cpp.
References mask_Rr_5.
|
static |
Definition at line 1922 of file decoder.cpp.
References mask_sreg_bit.
Definition at line 1797 of file decoder.cpp.
Referenced by avr_op_SBC::operator()(), avr_op_SBCI::operator()(), avr_op_SUB::operator()(), and avr_op_SUBI::operator()().
Definition at line 1805 of file decoder.cpp.
Referenced by avr_op_SBC::operator()(), avr_op_SBCI::operator()(), avr_op_SUB::operator()(), and avr_op_SUBI::operator()().
DecodedInstruction* lookup_opcode | ( | word | opcode, |
AvrDevice * | core | ||
) |
Translates an opcode to a instance of DecodedInstruction.
Definition at line 1949 of file decoder.cpp.
References avr_op_ILLEGAL::avr_op_ILLEGAL(), AvrDevice::flagEIJMPInstructions, AvrDevice::flagELPMInstructions, AvrDevice::flagIJMPInstructions, AvrDevice::flagIWInstructions, AvrDevice::flagJMPInstructions, AvrDevice::flagLPMInstructions, AvrDevice::flagMOVWInstruction, AvrDevice::flagMULInstructions, AvrDevice::flagTiny10, AvrDevice::flagTiny1x, mask_A_5, mask_A_6, mask_k_12, mask_k_22, mask_K_6, mask_k_7, mask_K_8, mask_q_displ, mask_Rd_2, mask_Rd_3, mask_Rd_4, mask_Rd_5, mask_reg_bit, mask_Rr_3, mask_Rr_4, mask_Rr_5, and mask_sreg_bit.
Referenced by AvrFlash::Decode(), and DecodedInstruction::GetModifiedRHi().
|
static |
Definition at line 1830 of file decoder.cpp.