亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? armsupp.c

?? skyeye-1.2-RC7-3的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*  armsupp.c -- ARMulator support code:  ARM6 Instruction Emulator.    Copyright (C) 1994 Advanced RISC Machines Ltd.     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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include "armdefs.h"#include "armemu.h"#include "ansidecl.h"//extern int skyeye_instr_debug;/* Definitions for the support routines.  */static ARMword ModeToBank (ARMword);static void EnvokeList (ARMul_State *, unsigned long, unsigned long);struct EventNode{				/* An event list node.  */	unsigned (*func) (ARMul_State *);	/* The function to call.  */	struct EventNode *next;};/* This routine returns the value of a register from a mode.  */ARMwordARMul_GetReg (ARMul_State * state, unsigned mode, unsigned reg){	mode &= MODEBITS;	if (mode != state->Mode)		return (state->RegBank[ModeToBank ((ARMword) mode)][reg]);	else		return (state->Reg[reg]);}/* This routine sets the value of a register for a mode.  */voidARMul_SetReg (ARMul_State * state, unsigned mode, unsigned reg, ARMword value){	mode &= MODEBITS;	if (mode != state->Mode)		state->RegBank[ModeToBank ((ARMword) mode)][reg] = value;	else		state->Reg[reg] = value;}/* This routine returns the value of the PC, mode independently.  */ARMwordARMul_GetPC (ARMul_State * state){	if (state->Mode > SVC26MODE)		return state->Reg[15];	else		return R15PC;}/* This routine returns the value of the PC, mode independently.  */ARMwordARMul_GetNextPC (ARMul_State * state){	if (state->Mode > SVC26MODE)		return state->Reg[15] + isize;	else		return (state->Reg[15] + isize) & R15PCBITS;}/* This routine sets the value of the PC.  */voidARMul_SetPC (ARMul_State * state, ARMword value){	if (ARMul_MODE32BIT)		state->Reg[15] = value & PCBITS;	else		state->Reg[15] = R15CCINTMODE | (value & R15PCBITS);	FLUSHPIPE;}/* This routine returns the value of register 15, mode independently.  */ARMwordARMul_GetR15 (ARMul_State * state){	if (state->Mode > SVC26MODE)		return (state->Reg[15]);	else		return (R15PC | ECC | ER15INT | EMODE);}/* This routine sets the value of Register 15.  */voidARMul_SetR15 (ARMul_State * state, ARMword value){	if (ARMul_MODE32BIT)		state->Reg[15] = value & PCBITS;	else {		state->Reg[15] = value;		ARMul_R15Altered (state);	}	FLUSHPIPE;}/* This routine returns the value of the CPSR.  */ARMwordARMul_GetCPSR (ARMul_State * state){	//chy 2003-08-20: below is from gdb20030716, maybe isn't suitable for system simulator	//return (CPSR | state->Cpsr); for gdb20030716	return (CPSR);		//had be tested in old skyeye with gdb5.0-5.3}/* This routine sets the value of the CPSR.  */voidARMul_SetCPSR (ARMul_State * state, ARMword value){	state->Cpsr = value;	ARMul_CPSRAltered (state);}/* This routine does all the nasty bits involved in a write to the CPSR,   including updating the register bank, given a MSR instruction.  */voidARMul_FixCPSR (ARMul_State * state, ARMword instr, ARMword rhs){	state->Cpsr = ARMul_GetCPSR (state);	//chy 2006-02-16 , should not consider system mode, don't conside 26bit mode	if (state->Mode != USER26MODE && state->Mode != USER32MODE ) {		/* In user mode, only write flags.  */		if (BIT (16))			SETPSR_C (state->Cpsr, rhs);		if (BIT (17))			SETPSR_X (state->Cpsr, rhs);		if (BIT (18))			SETPSR_S (state->Cpsr, rhs);	}	if (BIT (19))		SETPSR_F (state->Cpsr, rhs);	ARMul_CPSRAltered (state);}/* Get an SPSR from the specified mode.  */ARMwordARMul_GetSPSR (ARMul_State * state, ARMword mode){	ARMword bank = ModeToBank (mode & MODEBITS);	if (!BANK_CAN_ACCESS_SPSR (bank))		return ARMul_GetCPSR (state);	return state->Spsr[bank];}/* This routine does a write to an SPSR.  */voidARMul_SetSPSR (ARMul_State * state, ARMword mode, ARMword value){	ARMword bank = ModeToBank (mode & MODEBITS);	if (BANK_CAN_ACCESS_SPSR (bank))		state->Spsr[bank] = value;}/* This routine does a write to the current SPSR, given an MSR instruction.  */voidARMul_FixSPSR (ARMul_State * state, ARMword instr, ARMword rhs){	if (BANK_CAN_ACCESS_SPSR (state->Bank)) {		if (BIT (16))			SETPSR_C (state->Spsr[state->Bank], rhs);		if (BIT (17))			SETPSR_X (state->Spsr[state->Bank], rhs);		if (BIT (18))			SETPSR_S (state->Spsr[state->Bank], rhs);		if (BIT (19))			SETPSR_F (state->Spsr[state->Bank], rhs);	}}/* This routine updates the state of the emulator after the Cpsr has been   changed.  Both the processor flags and register bank are updated.  */voidARMul_CPSRAltered (ARMul_State * state){	ARMword oldmode;	if (state->prog32Sig == LOW)		state->Cpsr &= (CCBITS | INTBITS | R15MODEBITS);	oldmode = state->Mode;	if (state->Mode != (state->Cpsr & MODEBITS)) {		state->Mode =			ARMul_SwitchMode (state, state->Mode,					  state->Cpsr & MODEBITS);		state->NtransSig = (state->Mode & 3) ? HIGH : LOW;	}	//state->Cpsr &= ~MODEBITS;	ASSIGNINT (state->Cpsr & INTBITS);	//state->Cpsr &= ~INTBITS;	ASSIGNN ((state->Cpsr & NBIT) != 0);	//state->Cpsr &= ~NBIT;	ASSIGNZ ((state->Cpsr & ZBIT) != 0);	//state->Cpsr &= ~ZBIT;	ASSIGNC ((state->Cpsr & CBIT) != 0);	//state->Cpsr &= ~CBIT;	ASSIGNV ((state->Cpsr & VBIT) != 0);	//state->Cpsr &= ~VBIT;	ASSIGNS ((state->Cpsr & SBIT) != 0);	//state->Cpsr &= ~SBIT;#ifdef MODET	ASSIGNT ((state->Cpsr & TBIT) != 0);	//state->Cpsr &= ~TBIT;#endif	if (oldmode > SVC26MODE) {		if (state->Mode <= SVC26MODE) {			state->Emulate = CHANGEMODE;			state->Reg[15] = ECC | ER15INT | EMODE | R15PC;		}	}	else {		if (state->Mode > SVC26MODE) {			state->Emulate = CHANGEMODE;			state->Reg[15] = R15PC;		}		else			state->Reg[15] = ECC | ER15INT | EMODE | R15PC;	}}/* This routine updates the state of the emulator after register 15 has   been changed.  Both the processor flags and register bank are updated.   This routine should only be called from a 26 bit mode.  */voidARMul_R15Altered (ARMul_State * state){	if (state->Mode != R15MODE) {		state->Mode = ARMul_SwitchMode (state, state->Mode, R15MODE);		state->NtransSig = (state->Mode & 3) ? HIGH : LOW;	}	if (state->Mode > SVC26MODE)		state->Emulate = CHANGEMODE;	ASSIGNR15INT (R15INT);	ASSIGNN ((state->Reg[15] & NBIT) != 0);	ASSIGNZ ((state->Reg[15] & ZBIT) != 0);	ASSIGNC ((state->Reg[15] & CBIT) != 0);	ASSIGNV ((state->Reg[15] & VBIT) != 0);}/* This routine controls the saving and restoring of registers across mode   changes.  The regbank matrix is largely unused, only rows 13 and 14 are   used across all modes, 8 to 14 are used for FIQ, all others use the USER   column.  It's easier this way.  old and new parameter are modes numbers.   Notice the side effect of changing the Bank variable.  */ARMwordARMul_SwitchMode (ARMul_State * state, ARMword oldmode, ARMword newmode){	unsigned i;	ARMword oldbank;	ARMword newbank;	oldbank = ModeToBank (oldmode);	newbank = state->Bank = ModeToBank (newmode);	/* Do we really need to do it?  */	if (oldbank != newbank) {		/* Save away the old registers.  */		switch (oldbank) {		case USERBANK:		case IRQBANK:		case SVCBANK:		case ABORTBANK:		case UNDEFBANK:			if (newbank == FIQBANK)				for (i = 8; i < 13; i++)					state->RegBank[USERBANK][i] =						state->Reg[i];			state->RegBank[oldbank][13] = state->Reg[13];			state->RegBank[oldbank][14] = state->Reg[14];			break;		case FIQBANK:			for (i = 8; i < 15; i++)				state->RegBank[FIQBANK][i] = state->Reg[i];			break;		case DUMMYBANK:			for (i = 8; i < 15; i++)				state->RegBank[DUMMYBANK][i] = 0;			break;		default:			abort ();		}		/* Restore the new registers.  */		switch (newbank) {		case USERBANK:		case IRQBANK:		case SVCBANK:		case ABORTBANK:		case UNDEFBANK:			if (oldbank == FIQBANK)				for (i = 8; i < 13; i++)					state->Reg[i] =						state->RegBank[USERBANK][i];			state->Reg[13] = state->RegBank[newbank][13];			state->Reg[14] = state->RegBank[newbank][14];			break;		case FIQBANK:			for (i = 8; i < 15; i++)				state->Reg[i] = state->RegBank[FIQBANK][i];			break;		case DUMMYBANK:			for (i = 8; i < 15; i++)				state->Reg[i] = 0;			break;		default:			abort ();		}	}	return newmode;}/* Given a processor mode, this routine returns the   register bank that will be accessed in that mode.  */static ARMwordModeToBank (ARMword mode){	static ARMword bankofmode[] = {		USERBANK, FIQBANK, IRQBANK, SVCBANK,		DUMMYBANK, DUMMYBANK, DUMMYBANK, DUMMYBANK,		DUMMYBANK, DUMMYBANK, DUMMYBANK, DUMMYBANK,		DUMMYBANK, DUMMYBANK, DUMMYBANK, DUMMYBANK,		USERBANK, FIQBANK, IRQBANK, SVCBANK,		DUMMYBANK, DUMMYBANK, DUMMYBANK, ABORTBANK,		DUMMYBANK, DUMMYBANK, DUMMYBANK, UNDEFBANK,		DUMMYBANK, DUMMYBANK, DUMMYBANK, SYSTEMBANK	};	if (mode >= (sizeof (bankofmode) / sizeof (bankofmode[0])))		return DUMMYBANK;	return bankofmode[mode];}/* Returns the register number of the nth register in a reg list.  */unsignedARMul_NthReg (ARMword instr, unsigned number){	unsigned bit, upto;	for (bit = 0, upto = 0; upto <= number; bit++)		if (BIT (bit))			upto++;	return (bit - 1);}/* Assigns the N and Z flags depending on the value of result.  */voidARMul_NegZero (ARMul_State * state, ARMword result){	if (NEG (result)) {		SETN;		CLEARZ;	}	else if (result == 0) {		CLEARN;		SETZ;	}	else {		CLEARN;		CLEARZ;	}}/* Compute whether an addition of A and B, giving RESULT, overflowed.  */intAddOverflow (ARMword a, ARMword b, ARMword result){	return ((NEG (a) && NEG (b) && POS (result))		|| (POS (a) && POS (b) && NEG (result)));}/* Compute whether a subtraction of A and B, giving RESULT, overflowed.  */intSubOverflow (ARMword a, ARMword b, ARMword result){	return ((NEG (a) && POS (b) && POS (result))		|| (POS (a) && NEG (b) && NEG (result)));}/* Assigns the C flag after an addition of a and b to give result.  */voidARMul_AddCarry (ARMul_State * state, ARMword a, ARMword b, ARMword result){	ASSIGNC ((NEG (a) && NEG (b)) ||		 (NEG (a) && POS (result)) || (NEG (b) && POS (result)));}/* Assigns the V flag after an addition of a and b to give result.  */void

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区精品久久久| 精品国产乱码久久久久久闺蜜| 国产精品剧情在线亚洲| av成人动漫在线观看| 亚洲欧洲成人精品av97| 欧美三级电影在线观看| 日韩vs国产vs欧美| 久久九九久精品国产免费直播| 粉嫩一区二区三区在线看| 亚洲男人电影天堂| 欧美精品久久99久久在免费线| 久草精品在线观看| 国产精品欧美精品| 欧美老女人在线| 国产一区二区三区视频在线播放| 欧美国产欧美亚州国产日韩mv天天看完整| 床上的激情91.| 天堂va蜜桃一区二区三区| 久久久久国产精品麻豆ai换脸| 色综合夜色一区| 久久福利视频一区二区| 自拍偷拍国产精品| 欧美一级一级性生活免费录像| 成人性视频免费网站| 亚洲1区2区3区4区| 欧美激情中文不卡| 欧美日韩1234| 99视频一区二区| 久久99国产乱子伦精品免费| 亚洲色图视频网| 欧美xxx久久| 91激情在线视频| 国产一区二区三区日韩 | 国产99久久久国产精品潘金| 夜夜爽夜夜爽精品视频| 久久久久久免费| 在线播放日韩导航| 99精品视频在线播放观看| 欧美bbbbb| 亚洲国产成人tv| 亚洲三级小视频| 国产欧美日韩在线看| 欧美丰满少妇xxxbbb| 色视频欧美一区二区三区| 国产一区日韩二区欧美三区| 五月婷婷激情综合| 中文字幕色av一区二区三区| 欧美v日韩v国产v| 欧美精三区欧美精三区| 91亚洲精品一区二区乱码| 国产一区不卡视频| 精品中文字幕一区二区小辣椒| 亚洲国产日产av| 亚洲色图一区二区三区| 亚洲国产精品ⅴa在线观看| 精品国产一区二区在线观看| 欧美日韩高清在线| 91国偷自产一区二区开放时间| 成人午夜私人影院| 国产精品系列在线播放| 久99久精品视频免费观看| 日本成人在线电影网| 亚洲亚洲人成综合网络| 亚洲午夜激情av| 亚洲一区二三区| 亚洲午夜电影在线观看| 亚洲在线成人精品| 亚洲一区二区三区四区在线 | 欧美精品一区二区在线观看| 91精品在线免费| 91精品国产综合久久久久久久久久 | 国产精品综合视频| 国产乱子轮精品视频| 精品中文字幕一区二区小辣椒| 美国三级日本三级久久99| 麻豆精品视频在线观看视频| 麻豆精品视频在线观看视频| 久久丁香综合五月国产三级网站 | 亚洲国产你懂的| 午夜视频一区二区三区| 亚瑟在线精品视频| 日韩精品电影在线观看| 美女视频黄久久| 国产一区二区三区最好精华液| 国产精品888| aa级大片欧美| 日本道精品一区二区三区| 欧美视频一区二区三区在线观看 | 99久久综合色| 日本精品一区二区三区高清| 欧美亚男人的天堂| 欧美一区二区在线播放| 久久久国产午夜精品| 亚洲人妖av一区二区| 亚洲午夜一区二区三区| 日韩av在线发布| 国产精品88av| 欧日韩精品视频| 日韩欧美黄色影院| 国产精品久久久久毛片软件| 亚洲美女视频在线| 青青草97国产精品免费观看无弹窗版| 国精品**一区二区三区在线蜜桃 | 在线观看国产日韩| 日韩一级免费观看| 国产精品丝袜久久久久久app| 一区二区三区在线播放| 另类调教123区| 91丨porny丨首页| 日韩一区二区视频| 国产精品久久久久影院色老大| 亚洲一区二区视频在线| 国内精品视频666| 一本色道久久综合亚洲精品按摩 | 国产午夜久久久久| 一区二区三区欧美日韩| 久久99国产精品免费| 91精彩视频在线| 国产婷婷一区二区| 日本aⅴ亚洲精品中文乱码| 国产精品88888| 欧美一区二区三区白人| 中文字幕制服丝袜成人av| 蜜臀va亚洲va欧美va天堂| 99久久99久久精品国产片果冻 | 石原莉奈在线亚洲三区| 国产69精品久久久久毛片 | 国产精品一区免费在线观看| 欧美午夜一区二区三区免费大片| 久久久久久亚洲综合影院红桃| 一区二区三区中文免费| 国产成人av影院| 欧美mv日韩mv亚洲| 亚洲成av人片在www色猫咪| 成人高清伦理免费影院在线观看| 91精品久久久久久蜜臀| 亚洲午夜在线电影| 97国产一区二区| 国产亚洲成年网址在线观看| 丝袜脚交一区二区| 一本色道久久综合精品竹菊| 国产蜜臀av在线一区二区三区| 美女网站色91| 欧美欧美欧美欧美首页| 亚洲另类春色国产| 成人av资源在线观看| 国产日韩欧美激情| 黑人巨大精品欧美一区| 欧美成人a∨高清免费观看| 午夜精品免费在线观看| 欧美性色综合网| 亚洲综合视频在线| 欧洲精品在线观看| 亚洲精品视频观看| 色94色欧美sute亚洲线路二| 亚洲天堂av老司机| av午夜精品一区二区三区| 国产欧美一区二区精品婷婷 | 国产成人av福利| 26uuu色噜噜精品一区二区| 麻豆一区二区三区| 欧美一区二视频| 久久国产尿小便嘘嘘尿| 欧美第一区第二区| 久久er精品视频| 久久青草国产手机看片福利盒子 | 亚洲精品亚洲人成人网在线播放| 成人av免费在线播放| 中文字幕一区二区三区在线观看| 99视频热这里只有精品免费| 亚洲视频免费观看| 欧美性做爰猛烈叫床潮| 午夜精品一区二区三区免费视频| 欧美日韩国产a| 久久国产精品露脸对白| 国产婷婷一区二区| 色婷婷av一区二区三区软件| 亚洲一区二区精品视频| 欧美一区二区福利在线| 国产在线视频一区二区| 国产精品网友自拍| 色婷婷精品久久二区二区蜜臀av | 久久蜜桃av一区精品变态类天堂| 国产成人鲁色资源国产91色综| 国产亚洲一区二区三区在线观看| 大尺度一区二区| 亚洲午夜久久久久久久久电影网 | 韩国成人在线视频| 国产精品三级久久久久三级| 色哦色哦哦色天天综合| 偷拍亚洲欧洲综合| 337p日本欧洲亚洲大胆精品| 成人国产视频在线观看| 亚洲国产你懂的| 精品久久久久久久久久久久久久久 | 欧美狂野另类xxxxoooo| 精品一区二区国语对白| 中文字幕第一区综合| 欧美日韩二区三区| 国产传媒日韩欧美成人|