📄 cpu_i.h
字号:
/**
* 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 Processor/PPC/CPU_i.h
*
* \brief inline functions for ppc cpu
*
* \author Chenfeng Zhou <ini_autumn@163.com>
*
* Last update: <2005-02-09 23:23:43 by Cheney Chow>
*
* $Id: CPU_i.h,v 1.1 2005/06/16 06:01:44 qilj Exp $
*/
//=============================================================================
inline void PPC_CPU::init_pc_npc ()
{
pc_ = 0;
npc_ = 0;
}
inline bool PPC_CPU::ucos_ee_handler()
{
if (current_instr_ == 0x7c1113a6) {
cpu_state_.enable_ee_stack.push(cpu_state_.enable_ee);
cpu_state_.enable_ee = false;
return true;
}
else if (current_instr_ == 0x7c1013a6) {
if (!cpu_state_.enable_ee_stack.empty()) {
cpu_state_.enable_ee = cpu_state_.enable_ee_stack.top();
cpu_state_.enable_ee_stack.pop();
}
else
assert( 0 && "ee stack is empty!\n");
return true;
}
else if (current_instr_ == 0x7c0f13a6) {
cpu_state_.enable_ee = true;
return true;
}
return false;
}
inline PPC_Register &PPC_CPU::get_register (int index)
{
return this->reg_file_adaptor_[index];
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -