#include "decoder.h"
#include "hwstack.h"
#include "flash.h"
#include "hwwado.h"
#include "hwsreg.h"
#include "global.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. |
Definition at line 44 of file decoder.cpp.
static int get_A_5 | ( | word | opcode | ) | [static] |
Definition at line 1941 of file decoder.cpp.
References mask_A_5.
static int get_A_6 | ( | word | opcode | ) | [static] |
Definition at line 1946 of file decoder.cpp.
References mask_A_6.
Definition at line 1787 of file decoder.cpp.
Referenced by avr_op_ADD::operator()(), and avr_op_ADC::operator()().
Definition at line 1795 of file decoder.cpp.
Referenced by avr_op_ADD::operator()(), and avr_op_ADC::operator()().
Definition at line 1819 of file decoder.cpp.
Referenced by avr_op_CPI::operator()(), avr_op_CPC::operator()(), and avr_op_CP::operator()().
Definition at line 1827 of file decoder.cpp.
Referenced by avr_op_CPI::operator()(), avr_op_CPC::operator()(), and avr_op_CP::operator()().
static int get_k_12 | ( | word | opcode | ) | [static] |
Definition at line 1907 of file decoder.cpp.
References mask_k_12.
static int get_k_22 | ( | word | opcode | ) | [static] |
Definition at line 1912 of file decoder.cpp.
References mask_k_22.
Definition at line 1896 of file decoder.cpp.
References mask_K_6.
static int get_k_7 | ( | word | opcode | ) | [static] |
Definition at line 1902 of file decoder.cpp.
References mask_k_7.
Definition at line 1890 of file decoder.cpp.
References mask_K_8.
static int get_q | ( | word | opcode | ) | [static] |
Definition at line 1933 of file decoder.cpp.
References mask_q_displ.
static int get_rd_2 | ( | word | opcode | ) | [static] |
Definition at line 1850 of file decoder.cpp.
References mask_Rd_2.
static int get_rd_3 | ( | word | opcode | ) | [static] |
Definition at line 1856 of file decoder.cpp.
References mask_Rd_3.
static int get_rd_4 | ( | word | opcode | ) | [static] |
Definition at line 1862 of file decoder.cpp.
References mask_Rd_4.
static int get_rd_5 | ( | word | opcode | ) | [static] |
Definition at line 1868 of file decoder.cpp.
References mask_Rd_5.
static int get_reg_bit | ( | word | opcode | ) | [static] |
Definition at line 1923 of file decoder.cpp.
References mask_reg_bit.
static int get_rr_3 | ( | word | opcode | ) | [static] |
Definition at line 1874 of file decoder.cpp.
References mask_Rr_3.
static int get_rr_4 | ( | word | opcode | ) | [static] |
Definition at line 1879 of file decoder.cpp.
References mask_Rr_4.
static int get_rr_5 | ( | word | opcode | ) | [static] |
Definition at line 1884 of file decoder.cpp.
References mask_Rr_5.
static int get_sreg_bit | ( | word | opcode | ) | [static] |
Definition at line 1928 of file decoder.cpp.
References mask_sreg_bit.
Definition at line 1803 of file decoder.cpp.
Referenced by avr_op_SUBI::operator()(), avr_op_SUB::operator()(), avr_op_SBCI::operator()(), and avr_op_SBC::operator()().
Definition at line 1811 of file decoder.cpp.
Referenced by avr_op_SUBI::operator()(), avr_op_SUB::operator()(), avr_op_SBCI::operator()(), and avr_op_SBC::operator()().
DecodedInstruction* lookup_opcode | ( | word | opcode, | |
AvrDevice * | core | |||
) |
Translates an opcode to a instance of DecodedInstruction.
Definition at line 1955 of file decoder.cpp.
References 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().
static int n_bit_unsigned_to_signed | ( | unsigned int | val, | |
int | n | |||
) | [static] |
Definition at line 1836 of file decoder.cpp.