📄 instruction_set.cpp
字号:
/* -*- C++ -*- */
/**
* Copyright (c) 2005 Zhejiang University, P.R.China
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
///==================================================
/**
* @file Instruction_Set.cpp
* @brief Instruction set implementation
*
* @author Chenfeng Zhou <ini_autumn@163.com>
*
* Created : <2005-02-12 11:18:27 by Cheney Chow>
* Last update: <2005-02-12 17:09:49 by Cheney Chow>
*
* $Id: Instruction_Set.cpp,v 1.1 2005/06/16 06:01:45 qilj Exp $
*/
///==================================================
#include "Instruction_Set.h"
#include "Instruction_Subset.h"
#include "Instr_Declare.h"
namespace PPC
{
//! The root directory;
//! For first level searching;
Core::Instruction *PPC_Instruction_Set::main_op_table_[] =
{
op_align::instance(), // 0
op_invalid::instance(), // 1
op_invalid::instance(), // 2
op_twi::instance(), // 3
op_invalid::instance(), // 4
op_invalid::instance(), // 5
op_invalid::instance(), // 6
op_mulli::instance(), // 7
op_subfic::instance(), // 8
op_invalid::instance(), // 9
op_cmpli::instance(), // 10
op_cmpi::instance(), // 11
op_addic::instance(), // 12
op_addic_::instance(), // 13
op_addi::instance(), // 14
op_addis::instance(), // 15
op_bcx::instance(), // 16
op_sc::instance(), // 17
op_bx::instance(), // 18
op_group_1::instance(), // 19
op_rlwimix::instance(), // 20
op_rlwinmx::instance(), // 21
op_invalid::instance(), // 22
op_rlwnmx::instance(), // 23
op_ori::instance(), // 24
op_oris::instance(), // 25
op_xori::instance(), // 26
op_xoris::instance(), // 27
op_andi_::instance(), // 28
op_andis_::instance(), // 29
op_invalid::instance(), // 30
op_group_2::instance(), // 31
op_lwz::instance(), // 32
op_lwzu::instance(), // 33
op_lbz::instance(), // 34
op_lbzu::instance(), // 35
op_stw::instance(), // 36
op_stwu::instance(), // 37
op_stb::instance(), // 38
op_stbu::instance(), // 39
op_lhz::instance(), // 40
op_lhzu::instance(), // 41
op_lha::instance(), // 42
op_lhau::instance(), // 43
op_sth::instance(), // 44
op_sthu::instance(), // 45
op_lmw::instance(), // 46
op_stmw::instance(), // 47
op_lfs::instance(), // 48
op_lfsu::instance(), // 49
op_lfd::instance(), // 50
op_lfdu::instance(), // 51
op_stfs::instance(), // 52
op_stfsu::instance(), // 53
op_stfd::instance(), // 54
op_stfdu::instance(), // 55
op_invalid::instance(), // 56
op_invalid::instance(), // 57
op_invalid::instance(), // 58
op_group_f_1::instance(), // 59
op_invalid::instance(), // 60
op_invalid::instance(), // 61
op_invalid::instance(), // 62
op_group_f_2::instance(), // 63
};
DEFINE_SINGLETON(PPC_Instruction_Set)
//! Execute recursivly from top directory;
bool PPC_Instruction_Set::execute_instruction (PPC_Instr_T instr)
{
classify (instr)->execute (instr);
return true;
}
} // namespace PPC
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -