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

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

?? prim_ops.c

?? u-boot1.3.0的原碼,從配了網(wǎng)絡驅動和FLASH的驅動,并該用ESC竟如
?? C
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************************			Realmode X86 Emulator Library**		Copyright (C) 1991-2004 SciTech Software, Inc.*		     Copyright (C) David Mosberger-Tang*		       Copyright (C) 1999 Egbert Eich**  ========================================================================**  Permission to use, copy, modify, distribute, and sell this software and*  its documentation for any purpose is hereby granted without fee,*  provided that the above copyright notice appear in all copies and that*  both that copyright notice and this permission notice appear in*  supporting documentation, and that the name of the authors not be used*  in advertising or publicity pertaining to distribution of the software*  without specific, written prior permission.	The authors makes no*  representations about the suitability of this software for any purpose.*  It is provided "as is" without express or implied warranty.**  THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,*  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO*  EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR*  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF*  USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR*  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR*  PERFORMANCE OF THIS SOFTWARE.**  ========================================================================** Language:	ANSI C* Environment:	Any* Developer:	Kendall Bennett** Description:	This file contains the code to implement the primitive*		machine operations used by the emulation code in ops.c** Carry Chain Calculation** This represents a somewhat expensive calculation which is* apparently required to emulate the setting of the OF343364 and AF flag.* The latter is not so important, but the former is.  The overflow* flag is the XOR of the top two bits of the carry chain for an* addition (similar for subtraction).  Since we do not want to* simulate the addition in a bitwise manner, we try to calculate the* carry chain given the two operands and the result.** So, given the following table, which represents the addition of two* bits, we can derive a formula for the carry chain.** a   b	  cin	r     cout* 0   0	  0	0     0* 0   0	  1	1     0* 0   1	  0	1     0* 0   1	  1	0     1* 1   0	  0	1     0* 1   0	  1	0     1* 1   1	  0	0     1* 1   1	  1	1     1** Construction of table for cout:** ab* r  \	00   01	  11  10* |------------------* 0  |	 0    1	   1   1* 1  |	 0    0	   1   0** By inspection, one gets:  cc = ab +  r'(a + b)** That represents alot of operations, but NO CHOICE....** Borrow Chain Calculation.** The following table represents the subtraction of two bits, from* which we can derive a formula for the borrow chain.** a   b	  bin	r     bout* 0   0	  0	0     0* 0   0	  1	1     1* 0   1	  0	1     1* 0   1	  1	0     1* 1   0	  0	1     0* 1   0	  1	0     0* 1   1	  0	0     0* 1   1	  1	1     1** Construction of table for cout:** ab* r  \	00   01	  11  10* |------------------* 0  |	 0    1	   0   0* 1  |	 1    1	   1   0** By inspection, one gets:  bc = a'b +	r(a' + b)*****************************************************************************/#include <common.h>#define PRIM_OPS_NO_REDEFINE_ASM#if defined(CONFIG_BIOSEMU)#include "x86emu/x86emui.h"/*------------------------- Global Variables ------------------------------*/static u32 x86emu_parity_tab[8] ={    0x96696996,    0x69969669,    0x69969669,    0x96696996,    0x69969669,    0x96696996,    0x96696996,    0x69969669,};#define PARITY(x)   (((x86emu_parity_tab[(x) / 32] >> ((x) % 32)) & 1) == 0)#define XOR2(x)	    (((x) ^ ((x)>>1)) & 0x1)/*----------------------------- Implementation ----------------------------*/int abs(int v){	return (v>0)?v:-v;}/*----------------------------- Implementation ----------------------------*//*--------- Side effects helper functions -------*//****************************************************************************REMARKS:implements side efects for byte operations that don't overflow****************************************************************************/static void set_parity_flag(u32 res){    CONDITIONAL_SET_FLAG(PARITY(res & 0xFF), F_PF);}static void set_szp_flags_8(u8 res){    CONDITIONAL_SET_FLAG(res & 0x80, F_SF);    CONDITIONAL_SET_FLAG(res == 0, F_ZF);    set_parity_flag(res);}static void set_szp_flags_16(u16 res){    CONDITIONAL_SET_FLAG(res & 0x8000, F_SF);    CONDITIONAL_SET_FLAG(res == 0, F_ZF);    set_parity_flag(res);}static void set_szp_flags_32(u32 res){    CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF);    CONDITIONAL_SET_FLAG(res == 0, F_ZF);    set_parity_flag(res);}static void no_carry_byte_side_eff(u8 res){    CLEAR_FLAG(F_OF);    CLEAR_FLAG(F_CF);    CLEAR_FLAG(F_AF);    set_szp_flags_8(res);}static void no_carry_word_side_eff(u16 res){    CLEAR_FLAG(F_OF);    CLEAR_FLAG(F_CF);    CLEAR_FLAG(F_AF);    set_szp_flags_16(res);}static void no_carry_long_side_eff(u32 res){    CLEAR_FLAG(F_OF);    CLEAR_FLAG(F_CF);    CLEAR_FLAG(F_AF);    set_szp_flags_32(res);}static void calc_carry_chain(int bits, u32 d, u32 s, u32 res, int set_carry){    u32 cc;    cc = (s & d) | ((~res) & (s | d));    CONDITIONAL_SET_FLAG(XOR2(cc >> (bits - 2)), F_OF);    CONDITIONAL_SET_FLAG(cc & 0x8, F_AF);    if (set_carry) {	CONDITIONAL_SET_FLAG(res & (1 << bits), F_CF);    }}static void calc_borrow_chain(int bits, u32 d, u32 s, u32 res, int set_carry){    u32 bc;    bc = (res & (~d | s)) | (~d & s);    CONDITIONAL_SET_FLAG(XOR2(bc >> (bits - 2)), F_OF);    CONDITIONAL_SET_FLAG(bc & 0x8, F_AF);    if (set_carry) {	CONDITIONAL_SET_FLAG(bc & (1 << (bits - 1)), F_CF);    }}/****************************************************************************REMARKS:Implements the AAA instruction and side effects.****************************************************************************/u16 aaa_word(u16 d){    u16 res;    if ((d & 0xf) > 0x9 || ACCESS_FLAG(F_AF)) {	d += 0x6;	d += 0x100;	SET_FLAG(F_AF);	SET_FLAG(F_CF);    } else {	CLEAR_FLAG(F_CF);	CLEAR_FLAG(F_AF);    }    res = (u16)(d & 0xFF0F);    set_szp_flags_16(res);    return res;}/****************************************************************************REMARKS:Implements the AAA instruction and side effects.****************************************************************************/u16 aas_word(u16 d){    u16 res;    if ((d & 0xf) > 0x9 || ACCESS_FLAG(F_AF)) {	d -= 0x6;	d -= 0x100;	SET_FLAG(F_AF);	SET_FLAG(F_CF);    } else {	CLEAR_FLAG(F_CF);	CLEAR_FLAG(F_AF);    }    res = (u16)(d & 0xFF0F);    set_szp_flags_16(res);    return res;}/****************************************************************************REMARKS:Implements the AAD instruction and side effects.****************************************************************************/u16 aad_word(u16 d){    u16 l;    u8 hb, lb;    hb = (u8)((d >> 8) & 0xff);    lb = (u8)((d & 0xff));    l = (u16)((lb + 10 * hb) & 0xFF);    no_carry_byte_side_eff(l & 0xFF);    return l;}/****************************************************************************REMARKS:Implements the AAM instruction and side effects.****************************************************************************/u16 aam_word(u8 d){    u16 h, l;    h = (u16)(d / 10);    l = (u16)(d % 10);    l |= (u16)(h << 8);    no_carry_byte_side_eff(l & 0xFF);    return l;}/****************************************************************************REMARKS:Implements the ADC instruction and side effects.****************************************************************************/u8 adc_byte(u8 d, u8 s){    u32 res;   /* all operands in native machine order */    res = d + s;    if (ACCESS_FLAG(F_CF)) res++;    set_szp_flags_8(res);    calc_carry_chain(8,s,d,res,1);    return (u8)res;}/****************************************************************************REMARKS:Implements the ADC instruction and side effects.****************************************************************************/u16 adc_word(u16 d, u16 s){    u32 res;   /* all operands in native machine order */    res = d + s;    if (ACCESS_FLAG(F_CF))	res++;    set_szp_flags_16((u16)res);    calc_carry_chain(16,s,d,res,1);    return (u16)res;}/****************************************************************************REMARKS:Implements the ADC instruction and side effects.****************************************************************************/u32 adc_long(u32 d, u32 s){    u32 lo;    /* all operands in native machine order */    u32 hi;    u32 res;    lo = (d & 0xFFFF) + (s & 0xFFFF);    res = d + s;    if (ACCESS_FLAG(F_CF)) {	lo++;	res++;    }    hi = (lo >> 16) + (d >> 16) + (s >> 16);    set_szp_flags_32(res);    calc_carry_chain(32,s,d,res,0);    CONDITIONAL_SET_FLAG(hi & 0x10000, F_CF);    return res;}/****************************************************************************REMARKS:Implements the ADD instruction and side effects.****************************************************************************/u8 add_byte(u8 d, u8 s){    u32 res;   /* all operands in native machine order */    res = d + s;    set_szp_flags_8((u8)res);    calc_carry_chain(8,s,d,res,1);    return (u8)res;}/****************************************************************************REMARKS:Implements the ADD instruction and side effects.****************************************************************************/u16 add_word(u16 d, u16 s){    u32 res;   /* all operands in native machine order */    res = d + s;    set_szp_flags_16((u16)res);    calc_carry_chain(16,s,d,res,1);    return (u16)res;}/****************************************************************************REMARKS:Implements the ADD instruction and side effects.****************************************************************************/u32 add_long(u32 d, u32 s){    u32 res;    res = d + s;    set_szp_flags_32(res);    calc_carry_chain(32,s,d,res,0);    CONDITIONAL_SET_FLAG(res < d || res < s, F_CF);    return res;}/****************************************************************************REMARKS:Implements the AND instruction and side effects.****************************************************************************/u8 and_byte(u8 d, u8 s){    u8 res;    /* all operands in native machine order */    res = d & s;    no_carry_byte_side_eff(res);    return res;}/****************************************************************************REMARKS:Implements the AND instruction and side effects.****************************************************************************/u16 and_word(u16 d, u16 s){    u16 res;   /* all operands in native machine order */    res = d & s;    no_carry_word_side_eff(res);    return res;}/****************************************************************************REMARKS:Implements the AND instruction and side effects.****************************************************************************/u32 and_long(u32 d, u32 s){    u32 res;   /* all operands in native machine order */    res = d & s;    no_carry_long_side_eff(res);    return res;}/****************************************************************************REMARKS:Implements the CMP instruction and side effects.****************************************************************************/u8 cmp_byte(u8 d, u8 s){    u32 res;   /* all operands in native machine order */    res = d - s;    set_szp_flags_8((u8)res);    calc_borrow_chain(8, d, s, res, 1);    return d;}/****************************************************************************REMARKS:Implements the CMP instruction and side effects.****************************************************************************/u16 cmp_word(u16 d, u16 s){    u32 res;   /* all operands in native machine order */    res = d - s;    set_szp_flags_16((u16)res);    calc_borrow_chain(16, d, s, res, 1);    return d;}/****************************************************************************REMARKS:Implements the CMP instruction and side effects.****************************************************************************/u32 cmp_long(u32 d, u32 s){    u32 res;   /* all operands in native machine order */    res = d - s;    set_szp_flags_32(res);    calc_borrow_chain(32, d, s, res, 1);    return d;}/****************************************************************************REMARKS:Implements the DAA instruction and side effects.****************************************************************************/u8 daa_byte(u8 d){    u32 res = d;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲图片小说| 一区二区视频免费在线观看| 樱花草国产18久久久久| 国产成人在线观看免费网站| 精品少妇一区二区三区在线视频| 亚洲综合色成人| 91在线视频观看| 国产精品全国免费观看高清| 国产精品羞羞答答xxdd| 日韩欧美在线网站| 毛片av中文字幕一区二区| 欧美日韩色综合| 五月天视频一区| 欧美一级xxx| 激情文学综合丁香| 亚洲精品一区二区三区香蕉| 日韩欧美在线1卡| 日韩一区二区三区在线| 久久久久久麻豆| 97精品国产露脸对白| jvid福利写真一区二区三区| 国产精品一二三| 国产精品美女www爽爽爽| 韩国v欧美v日本v亚洲v| 精品国产青草久久久久福利| 韩国视频一区二区| 久久一二三国产| 成人性色生活片| 亚洲欧美日本在线| 欧美日韩国产123区| 蜜桃视频一区二区| 26uuu亚洲| 波多野结衣在线aⅴ中文字幕不卡| 欧美高清在线一区| 色丁香久综合在线久综合在线观看| 香蕉久久一区二区不卡无毒影院| 国产精品综合一区二区三区| 国产高清成人在线| 国产精品久久久久9999吃药| 色域天天综合网| 日韩高清在线一区| 精品国产网站在线观看| 国产精品99久久不卡二区| 亚洲欧美激情小说另类| 欧美另类videos死尸| 久久69国产一区二区蜜臀 | 精品久久久久久最新网址| 激情欧美日韩一区二区| 国产精品日日摸夜夜摸av| 91久久精品午夜一区二区| 免费高清在线一区| 中文字幕亚洲一区二区va在线| 欧美在线999| 国产乱对白刺激视频不卡| 亚洲欧美日韩在线| 久久婷婷国产综合国色天香| 精品国免费一区二区三区| 久久综合视频网| 日韩va欧美va亚洲va久久| 日本韩国视频一区二区| 理论片日本一区| 亚洲色大成网站www久久九九| 7777精品伊人久久久大香线蕉的 | 日韩欧美中文字幕精品| 一本在线高清不卡dvd| 日韩高清一区在线| 国产精品久久久久久久午夜片| 91精品视频网| 91色综合久久久久婷婷| 激情久久五月天| 亚洲乱码中文字幕| 欧美中文字幕一区| 日本欧美加勒比视频| 亚洲大片精品永久免费| 欧美国产一区视频在线观看| 欧美欧美欧美欧美| 99re视频精品| 国产成人aaa| 久久国产精品72免费观看| 夜夜爽夜夜爽精品视频| 国产精品美女久久久久久| 精品福利一区二区三区免费视频| 在线观看av一区二区| 99视频在线精品| 亚洲午夜激情网站| 中文字幕精品—区二区四季| 欧美日韩电影在线播放| 91论坛在线播放| av高清不卡在线| 欧美日韩视频第一区| 在线看不卡av| 成人免费高清在线观看| 高清不卡一区二区| 国产精品一级片在线观看| 精品一区二区影视| 久草热8精品视频在线观看| 亚洲欧美日韩国产手机在线| 日韩一区二区三区观看| 免费人成精品欧美精品 | 色婷婷综合久久久| 北条麻妃一区二区三区| 波多野结衣中文字幕一区| 国产成人综合亚洲91猫咪| 日本欧美一区二区| 日韩精品一级中文字幕精品视频免费观看 | 亚洲国产精品久久不卡毛片| 亚洲精品久久7777| 亚洲乱码中文字幕综合| 一区二区三区中文字幕电影 | 国产精品情趣视频| 最好看的中文字幕久久| 亚洲天堂福利av| 免费成人你懂的| 午夜精品福利视频网站| 婷婷亚洲久悠悠色悠在线播放| 午夜av一区二区三区| 美女视频黄a大片欧美| 国产在线精品一区二区夜色| 国产在线视视频有精品| 成人妖精视频yjsp地址| a级精品国产片在线观看| 97久久精品人人做人人爽| 99久久精品情趣| 色老汉一区二区三区| 欧美日韩黄视频| 精品嫩草影院久久| 国产精品入口麻豆九色| 玉足女爽爽91| 蜜臀精品一区二区三区在线观看 | 七七婷婷婷婷精品国产| 久久精品国产色蜜蜜麻豆| 国产成人在线看| 91视频观看视频| 欧美精品在线观看一区二区| 91精品国产综合久久久久久久久久 | 亚洲丝袜制服诱惑| 亚洲国产视频直播| 日本亚洲视频在线| 激情深爱一区二区| 在线一区二区视频| 久久综合狠狠综合久久激情| 中文字幕一区二区不卡| 无码av中文一区二区三区桃花岛| 紧缚捆绑精品一区二区| 91香蕉视频在线| 欧美变态tickle挠乳网站| 综合在线观看色| 日韩精品电影一区亚洲| 99在线精品视频| 亚洲人成在线播放网站岛国| 亚洲欧美另类小说| 成人app在线| 亚洲在线视频网站| 成a人片亚洲日本久久| 国产综合色在线视频区| 色综合久久99| 久久综合色天天久久综合图片| 一区二区三区日韩欧美精品 | 亚洲欧美二区三区| 免费在线观看视频一区| av亚洲产国偷v产偷v自拍| 日韩午夜av电影| 亚洲国产精品一区二区www在线| 国产福利一区在线观看| 欧美日韩精品欧美日韩精品| 中文字幕亚洲精品在线观看| 国产一区二区主播在线| 日韩精品一区二区三区中文不卡| 视频一区二区不卡| 日韩一区二区三区视频在线| fc2成人免费人成在线观看播放 | 久久福利视频一区二区| 欧美mv和日韩mv国产网站| 久久国产福利国产秒拍| 久久网这里都是精品| 国产伦精品一区二区三区免费迷 | 日本一区二区成人| 福利一区二区在线| 欧美国产成人在线| 99国产精品99久久久久久| 专区另类欧美日韩| 色综合激情久久| 亚洲综合图片区| 欧美精三区欧美精三区| 日本成人中文字幕在线视频| 日韩精品中文字幕一区| 国产乱码精品一区二区三区av | 欧美一区二区视频网站| 日韩电影在线观看网站| www一区二区| 成人av资源在线| 亚洲一区二区三区四区不卡| 制服丝袜av成人在线看| 国产河南妇女毛片精品久久久| 久久精品一二三| 日本道色综合久久| 日本怡春院一区二区| 国产亚洲欧美色| 日本道色综合久久| 捆绑调教一区二区三区|