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

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

?? helper.c

?? QEMU 0.91 source code, supports ARM processor including S3C24xx series
?? C
字號:
/* *  SH4 emulation * *  Copyright (c) 2005 Samuel Tardieu * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include <stdarg.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <inttypes.h>#include <signal.h>#include <assert.h>#include "cpu.h"#include "exec-all.h"#include "hw/sh_intc.h"#if defined(CONFIG_USER_ONLY)void do_interrupt (CPUState *env){  env->exception_index = -1;}int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,			     int mmu_idx, int is_softmmu){    env->tea = address;    env->exception_index = 0;    switch (rw) {    case 0:	env->tea = address;        env->exception_index = 0x0a0;        break;    case 1:	env->tea = address;        env->exception_index = 0x0c0;        break;    }    return 1;}target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr){    return addr;}#else /* !CONFIG_USER_ONLY */#define MMU_OK                   0#define MMU_ITLB_MISS            (-1)#define MMU_ITLB_MULTIPLE        (-2)#define MMU_ITLB_VIOLATION       (-3)#define MMU_DTLB_MISS_READ       (-4)#define MMU_DTLB_MISS_WRITE      (-5)#define MMU_DTLB_INITIAL_WRITE   (-6)#define MMU_DTLB_VIOLATION_READ  (-7)#define MMU_DTLB_VIOLATION_WRITE (-8)#define MMU_DTLB_MULTIPLE        (-9)#define MMU_DTLB_MISS            (-10)void do_interrupt(CPUState * env){    int do_irq = env->interrupt_request & CPU_INTERRUPT_HARD;    int do_exp, irq_vector = env->exception_index;    /* prioritize exceptions over interrupts */    do_exp = env->exception_index != -1;    do_irq = do_irq && (env->exception_index == -1);    if (env->sr & SR_BL) {        if (do_exp && env->exception_index != 0x1e0) {            env->exception_index = 0x000; /* masked exception -> reset */        }        if (do_irq) {            return; /* masked */        }    }    if (do_irq) {        irq_vector = sh_intc_get_pending_vector(env->intc_handle,						(env->sr >> 4) & 0xf);        if (irq_vector == -1) {            return; /* masked */	}    }    if (loglevel & CPU_LOG_INT) {	const char *expname;	switch (env->exception_index) {	case 0x0e0:	    expname = "addr_error";	    break;	case 0x040:	    expname = "tlb_miss";	    break;	case 0x0a0:	    expname = "tlb_violation";	    break;	case 0x180:	    expname = "illegal_instruction";	    break;	case 0x1a0:	    expname = "slot_illegal_instruction";	    break;	case 0x800:	    expname = "fpu_disable";	    break;	case 0x820:	    expname = "slot_fpu";	    break;	case 0x100:	    expname = "data_write";	    break;	case 0x060:	    expname = "dtlb_miss_write";	    break;	case 0x0c0:	    expname = "dtlb_violation_write";	    break;	case 0x120:	    expname = "fpu_exception";	    break;	case 0x080:	    expname = "initial_page_write";	    break;	case 0x160:	    expname = "trapa";	    break;	default:            expname = do_irq ? "interrupt" : "???";            break;	}	fprintf(logfile, "exception 0x%03x [%s] raised\n",		irq_vector, expname);	cpu_dump_state(env, logfile, fprintf, 0);    }    env->ssr = env->sr;    env->spc = env->pc;    env->sgr = env->gregs[15];    env->sr |= SR_BL | SR_MD | SR_RB;    if (do_exp) {        env->expevt = env->exception_index;        switch (env->exception_index) {        case 0x000:        case 0x020:        case 0x140:            env->sr &= ~SR_FD;            env->sr |= 0xf << 4; /* IMASK */            env->pc = 0xa0000000;            break;        case 0x040:        case 0x060:            env->pc = env->vbr + 0x400;            break;        case 0x160:            env->spc += 2; /* special case for TRAPA */            /* fall through */        default:            env->pc = env->vbr + 0x100;            break;        }        return;    }    if (do_irq) {        env->intevt = irq_vector;        env->pc = env->vbr + 0x600;        return;    }}static void update_itlb_use(CPUState * env, int itlbnb){    uint8_t or_mask = 0, and_mask = (uint8_t) - 1;    switch (itlbnb) {    case 0:	and_mask = 0x7f;	break;    case 1:	and_mask = 0xe7;	or_mask = 0x80;	break;    case 2:	and_mask = 0xfb;	or_mask = 0x50;	break;    case 3:	or_mask = 0x2c;	break;    }    env->mmucr &= (and_mask << 24);    env->mmucr |= (or_mask << 24);}static int itlb_replacement(CPUState * env){    if ((env->mmucr & 0xe0000000) == 0xe0000000)	return 0;    if ((env->mmucr & 0x98000000) == 0x08000000)	return 1;    if ((env->mmucr & 0x54000000) == 0x04000000)	return 2;    if ((env->mmucr & 0x2c000000) == 0x00000000)	return 3;    assert(0);}/* Find the corresponding entry in the right TLB   Return entry, MMU_DTLB_MISS or MMU_DTLB_MULTIPLE*/static int find_tlb_entry(CPUState * env, target_ulong address,			  tlb_t * entries, uint8_t nbtlb, int use_asid){    int match = MMU_DTLB_MISS;    uint32_t start, end;    uint8_t asid;    int i;    asid = env->pteh & 0xff;    for (i = 0; i < nbtlb; i++) {	if (!entries[i].v)	    continue;		/* Invalid entry */	if (use_asid && entries[i].asid != asid && !entries[i].sh)	    continue;		/* Bad ASID */#if 0	switch (entries[i].sz) {	case 0:	    size = 1024;	/* 1kB */	    break;	case 1:	    size = 4 * 1024;	/* 4kB */	    break;	case 2:	    size = 64 * 1024;	/* 64kB */	    break;	case 3:	    size = 1024 * 1024;	/* 1MB */	    break;	default:	    assert(0);	}#endif	start = (entries[i].vpn << 10) & ~(entries[i].size - 1);	end = start + entries[i].size - 1;	if (address >= start && address <= end) {	/* Match */	    if (match != -1)		return MMU_DTLB_MULTIPLE;	/* Multiple match */	    match = i;	}    }    return match;}/* Find itlb entry - update itlb from utlb if necessary and asked for   Return entry, MMU_ITLB_MISS, MMU_ITLB_MULTIPLE or MMU_DTLB_MULTIPLE   Update the itlb from utlb if update is not 0*/int find_itlb_entry(CPUState * env, target_ulong address,		    int use_asid, int update){    int e, n;    e = find_tlb_entry(env, address, env->itlb, ITLB_SIZE, use_asid);    if (e == MMU_DTLB_MULTIPLE)	e = MMU_ITLB_MULTIPLE;    else if (e == MMU_DTLB_MISS && update) {	e = find_tlb_entry(env, address, env->utlb, UTLB_SIZE, use_asid);	if (e >= 0) {	    n = itlb_replacement(env);	    env->itlb[n] = env->utlb[e];	    e = n;	}    }    if (e >= 0)	update_itlb_use(env, e);    return e;}/* Find utlb entry   Return entry, MMU_DTLB_MISS, MMU_DTLB_MULTIPLE */int find_utlb_entry(CPUState * env, target_ulong address, int use_asid){    uint8_t urb, urc;    /* Increment URC */    urb = ((env->mmucr) >> 18) & 0x3f;    urc = ((env->mmucr) >> 10) & 0x3f;    urc++;    if (urc == urb || urc == UTLB_SIZE - 1)	urc = 0;    env->mmucr = (env->mmucr & 0xffff03ff) | (urc << 10);    /* Return entry */    return find_tlb_entry(env, address, env->utlb, UTLB_SIZE, use_asid);}/* Match address against MMU   Return MMU_OK, MMU_DTLB_MISS_READ, MMU_DTLB_MISS_WRITE,   MMU_DTLB_INITIAL_WRITE, MMU_DTLB_VIOLATION_READ,   MMU_DTLB_VIOLATION_WRITE, MMU_ITLB_MISS,   MMU_ITLB_MULTIPLE, MMU_ITLB_VIOLATION*/static int get_mmu_address(CPUState * env, target_ulong * physical,			   int *prot, target_ulong address,			   int rw, int access_type){    int use_asid, is_code, n;    tlb_t *matching = NULL;    use_asid = (env->mmucr & MMUCR_SV) == 0 && (env->sr & SR_MD) == 0;    is_code = env->pc == address;	/* Hack */    /* Use a hack to find if this is an instruction or data access */    if (env->pc == address && !(rw & PAGE_WRITE)) {	n = find_itlb_entry(env, address, use_asid, 1);	if (n >= 0) {	    matching = &env->itlb[n];	    if ((env->sr & SR_MD) & !(matching->pr & 2))		n = MMU_ITLB_VIOLATION;	    else		*prot = PAGE_READ;	}    } else {	n = find_utlb_entry(env, address, use_asid);	if (n >= 0) {	    matching = &env->utlb[n];	    switch ((matching->pr << 1) | ((env->sr & SR_MD) ? 1 : 0)) {	    case 0:		/* 000 */	    case 2:		/* 010 */		n = (rw & PAGE_WRITE) ? MMU_DTLB_VIOLATION_WRITE :		    MMU_DTLB_VIOLATION_READ;		break;	    case 1:		/* 001 */	    case 4:		/* 100 */	    case 5:		/* 101 */		if (rw & PAGE_WRITE)		    n = MMU_DTLB_VIOLATION_WRITE;		else		    *prot = PAGE_READ;		break;	    case 3:		/* 011 */	    case 6:		/* 110 */	    case 7:		/* 111 */		*prot = rw & (PAGE_READ | PAGE_WRITE);		break;	    }	} else if (n == MMU_DTLB_MISS) {	    n = (rw & PAGE_WRITE) ? MMU_DTLB_MISS_WRITE :		MMU_DTLB_MISS_READ;	}    }    if (n >= 0) {	*physical = ((matching->ppn << 10) & ~(matching->size - 1)) |	    (address & (matching->size - 1));	if ((rw & PAGE_WRITE) & !matching->d)	    n = MMU_DTLB_INITIAL_WRITE;	else	    n = MMU_OK;    }    return n;}int get_physical_address(CPUState * env, target_ulong * physical,			 int *prot, target_ulong address,			 int rw, int access_type){    /* P1, P2 and P4 areas do not use translation */    if ((address >= 0x80000000 && address < 0xc0000000) ||	address >= 0xe0000000) {	if (!(env->sr & SR_MD)	    && (address < 0xe0000000 || address > 0xe4000000)) {	    /* Unauthorized access in user mode (only store queues are available) */	    fprintf(stderr, "Unauthorized access\n");	    return (rw & PAGE_WRITE) ? MMU_DTLB_MISS_WRITE :		MMU_DTLB_MISS_READ;	}	/* Mask upper 3 bits */	*physical = address & 0x1FFFFFFF;	*prot = PAGE_READ | PAGE_WRITE;	return MMU_OK;    }    /* If MMU is disabled, return the corresponding physical page */    if (!env->mmucr & MMUCR_AT) {	*physical = address & 0x1FFFFFFF;	*prot = PAGE_READ | PAGE_WRITE;	return MMU_OK;    }    /* We need to resort to the MMU */    return get_mmu_address(env, physical, prot, address, rw, access_type);}int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,			     int mmu_idx, int is_softmmu){    target_ulong physical, page_offset, page_size;    int prot, ret, access_type;    /* XXXXX */#if 0    fprintf(stderr, "%s pc %08x ad %08x rw %d mmu_idx %d smmu %d\n",	    __func__, env->pc, address, rw, mmu_idx, is_softmmu);#endif    access_type = ACCESS_INT;    ret =	get_physical_address(env, &physical, &prot, address, rw,			     access_type);    if (ret != MMU_OK) {	env->tea = address;	switch (ret) {	case MMU_ITLB_MISS:	case MMU_DTLB_MISS_READ:	    env->exception_index = 0x040;	    break;	case MMU_DTLB_MULTIPLE:	case MMU_ITLB_MULTIPLE:	    env->exception_index = 0x140;	    break;	case MMU_ITLB_VIOLATION:	    env->exception_index = 0x0a0;	    break;	case MMU_DTLB_MISS_WRITE:	    env->exception_index = 0x060;	    break;	case MMU_DTLB_INITIAL_WRITE:	    env->exception_index = 0x080;	    break;	case MMU_DTLB_VIOLATION_READ:	    env->exception_index = 0x0a0;	    break;	case MMU_DTLB_VIOLATION_WRITE:	    env->exception_index = 0x0c0;	    break;	default:	    assert(0);	}	return 1;    }    page_size = TARGET_PAGE_SIZE;    page_offset =	(address - (address & TARGET_PAGE_MASK)) & ~(page_size - 1);    address = (address & TARGET_PAGE_MASK) + page_offset;    physical = (physical & TARGET_PAGE_MASK) + page_offset;    return tlb_set_page(env, address, physical, prot, mmu_idx, is_softmmu);}target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr){    target_ulong physical;    int prot;    get_physical_address(env, &physical, &prot, addr, PAGE_READ, 0);    return physical;}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女性感视频久久| 欧美一二三区在线| 国产精品大尺度| 韩国精品主播一区二区在线观看| 欧洲另类一二三四区| 中文字幕一区二区三区乱码在线| 韩国成人精品a∨在线观看| 日韩精品中文字幕一区二区三区 | 91麻豆国产福利在线观看| 久久在线免费观看| 国产99一区视频免费| 中文在线一区二区| 99久久精品国产麻豆演员表| 国产精品免费网站在线观看| 99视频精品全部免费在线| 国产精品美日韩| 欧洲激情一区二区| 日韩中文字幕亚洲一区二区va在线| 欧美人牲a欧美精品| 日本在线不卡视频| 国产三级精品三级在线专区| 懂色av一区二区夜夜嗨| 亚洲自拍偷拍综合| 日韩三级视频在线看| av毛片久久久久**hd| 午夜精品一区在线观看| 国产女人18水真多18精品一级做 | 91啪九色porn原创视频在线观看| 亚洲欧美另类久久久精品| 日韩一区二区不卡| 99久久精品情趣| 国产专区欧美精品| 日韩电影免费在线看| 亚洲欧洲韩国日本视频| 亚洲精品一线二线三线无人区| a级精品国产片在线观看| 免费欧美在线视频| 综合自拍亚洲综合图不卡区| 欧美不卡一区二区三区| 欧美色视频在线| 中文字幕亚洲在| 成人小视频在线| 日韩国产欧美一区二区三区| 日韩理论片在线| 日本一区二区综合亚洲| 亚洲精品在线观看网站| 欧美夫妻性生活| 欧美三级蜜桃2在线观看| 国产成人超碰人人澡人人澡| 精品亚洲免费视频| 免费观看久久久4p| 久久 天天综合| 久久国内精品自在自线400部| 亚洲国产aⅴ成人精品无吗| 亚洲资源在线观看| 亚洲国产毛片aaaaa无费看| 亚洲美女屁股眼交| 亚洲另类春色校园小说| 亚洲欧美一区二区三区极速播放| 中文子幕无线码一区tr| ...xxx性欧美| 亚洲一区国产视频| 蜜桃一区二区三区在线| 久久99国产精品麻豆| 国产精品亚洲午夜一区二区三区| 成人免费高清视频在线观看| 成人精品视频一区二区三区 | 亚洲人成伊人成综合网小说| 亚洲精品日日夜夜| 精品午夜一区二区三区在线观看| 国产在线日韩欧美| 色悠悠久久综合| 555夜色666亚洲国产免| 国产日韩综合av| 日韩影院精彩在线| 成人av网站大全| 欧美一区三区二区| 亚洲天堂成人在线观看| 蜜臀av一区二区在线免费观看| 国产精品一区三区| 精品视频在线免费| 国产偷国产偷精品高清尤物| 天堂久久久久va久久久久| 国产成人午夜精品5599| 在线播放一区二区三区| 亚洲在线视频一区| 91小宝寻花一区二区三区| 久久免费的精品国产v∧| 亚洲成av人**亚洲成av**| av亚洲精华国产精华精华| 久久婷婷国产综合精品青草| 视频在线观看91| 欧美日韩国产一级二级| 亚洲美女电影在线| 91在线观看美女| 亚洲精品中文在线影院| 99精品视频在线观看免费| 久久久综合视频| 国产一区视频在线看| 日韩美女在线视频| 久久91精品国产91久久小草| 欧美电视剧在线看免费| 日韩经典一区二区| 日韩一区二区在线看片| 天天影视网天天综合色在线播放| 欧洲日韩一区二区三区| 亚洲第一精品在线| 欧美一卡2卡三卡4卡5免费| 日日夜夜一区二区| 久久久久久97三级| 国产suv精品一区二区6| 亚洲视频资源在线| 欧美丝袜丝交足nylons| 欧美aaa在线| 国产农村妇女毛片精品久久麻豆| 91天堂素人约啪| 性做久久久久久久久| 91蝌蚪porny| 欧美一区三区四区| 美女精品一区二区| 亚洲欧洲日韩av| 欧美白人最猛性xxxxx69交| 国产精品69毛片高清亚洲| 亚洲手机成人高清视频| 欧美一区二区在线免费播放| 国产一区美女在线| 视频在线在亚洲| 国产精品亲子伦对白| 欧美日韩国产美| 成人午夜视频免费看| 青青草97国产精品免费观看 | 欧美性色欧美a在线播放| 狠狠色狠狠色综合系列| 亚洲成a人片在线不卡一二三区| 亚洲精品一区二区三区影院| 在线亚洲人成电影网站色www| 理论片日本一区| 午夜精品免费在线| 亚洲精品视频在线观看网站| 久久综合色鬼综合色| 欧美日本在线一区| 日本精品一区二区三区高清| 成人一区在线看| 久久精品久久综合| 午夜欧美大尺度福利影院在线看| 中文字幕在线观看一区| 久久久久国产精品麻豆ai换脸 | 日本伊人色综合网| 亚洲成人tv网| 日一区二区三区| 日本午夜一本久久久综合| 亚洲成av人综合在线观看| 一区二区三区欧美日韩| 亚洲一区二区三区免费视频| 亚洲精品福利视频网站| 亚洲午夜免费电影| 日韩精品乱码av一区二区| 日本最新不卡在线| 久久精品国内一区二区三区| 日韩精品亚洲专区| 国产一区福利在线| 成人午夜免费视频| 91亚洲精华国产精华精华液| 9i在线看片成人免费| 一本到不卡免费一区二区| 在线视频欧美区| 日韩欧美中文字幕一区| 精品国产91乱码一区二区三区 | 欧美tickling挠脚心丨vk| 久久夜色精品一区| 1024成人网| 精品一区二区三区影院在线午夜 | jlzzjlzz欧美大全| 在线视频观看一区| 欧美精品一区二区三区一线天视频 | 久久久精品一品道一区| 亚洲三级久久久| 狠狠v欧美v日韩v亚洲ⅴ| 不卡一区中文字幕| 欧美一二三四区在线| 亚洲视频一二区| 国产精品一区二区黑丝| 日本久久电影网| 亚洲国产精品成人综合| 美腿丝袜亚洲色图| 99麻豆久久久国产精品免费优播| 欧美日韩另类一区| 中文字幕永久在线不卡| 国产高清视频一区| 91精品欧美福利在线观看| 久久久不卡影院| 免费观看一级欧美片| 欧美久久一区二区| 一区二区在线观看免费视频播放 | 欧美一二区视频| 久久久久88色偷偷免费| 青草av.久久免费一区| 欧美日韩一区二区三区在线| 亚洲天堂a在线| 9人人澡人人爽人人精品|