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

📄 cache.c

📁 skyeye的开源代码
💻 C
字号:
#include "instr.h"#include "emul.h"int decode_cache(MIPS_State* mstate, Instr instr) //Use in Cache Instruction, it's unuseable in R3000{    	// CP0 is usable in kernel mode or when the CU bit in SR is set.    	if (!(mstate->mode & kmode) && !bit(mstate->cp0[SR], SR_CU0))		process_coprocessor_unusable(mstate, 0);	    	VA va = sign_extend_UInt32(offset(instr), 16) + mstate->gpr[base(instr)];    	PA pa = translate_vaddr(mstate, va, cache_op);    	if (pa != bad_pa) {		if (bit(instr, 16)) {	    		// Control data cache.	    		control_dcache(mstate, va, pa, bits(instr, 20, 18), bit(instr, 17));		} else {	    		// Control instruction cache.	    		control_icache(mstate, va, pa, bits(instr, 20, 18), bit(instr, 17));		}    	}    	return nothing_special;}

⌨️ 快捷键说明

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