⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mls_instruction.h

📁 浙江大学的悟空嵌入式系统模拟器
💻 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    ARM/MLS_Instruction.h
 *
 *  $Id: MLS_Instruction.h,v 1.4 2005/06/16 05:49:36 chenj Exp $
 *
 *  \author  Jie Chen <alt_alt@163.com> 
 */
//=============================================================================
#ifndef ARM__MLS_INSTRUCTION_H_INCLUDED
#define ARM__MLS_INSTRUCTION_H_INCLUDED

#include "Instruction.h"

namespace ARM { 

	//!the class simulate mutiple memory access instructions
	class MLS_Instruction: public ARM::Instruction
	{
	protected:

		virtual void execute(Core::Instruction_Unit  binary);

		//!calculate the number of registers in register list
		void bit_num(u32 & num,Core::Instruction_Unit & binary,u32 start,u32 end);

		//!addressing mode of this kind of instruction
		u32 multi_address(Core::Instruction_Unit & binary,u32 & start_address,u32 & end_address);

		//!forcing get addresss with registers of user mode
		void get_usermode_address(Core::Instruction_Unit & binary,u32 & addr);

		//!shift the value of register Rm
		void shft_rm(Core::Instruction_Unit & binary,u32 & index);

		//!execution of LDM
		void LDM1(Core::Instruction_Unit & binary);

		//!execution of LDM
		void LDM2(Core::Instruction_Unit & binary); //user-mode

		//!execution of LDM
		void LDM3(Core::Instruction_Unit & binary); //带状态寄存器

		//!execution of STM
		void STM1(Core::Instruction_Unit & binary);

		//!execution of STM
		void STM2(Core::Instruction_Unit & binary); //user-mode

		DECLARE_SINGLETON(MLS_Instruction)

	};
}
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -