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

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

?? fpu_entry.c

?? LINUX1.0源代碼,代碼條理清晰
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*---------------------------------------------------------------------------+
 |  fpu_entry.c                                                              |
 |                                                                           |
 | The entry function for wm-FPU-emu                                         |
 |                                                                           |
 | Copyright (C) 1992,1993,1994                                              |
 |                       W. Metzenthen, 22 Parker St, Ormond, Vic 3163,      |
 |                       Australia.  E-mail   billm@vaxc.cc.monash.edu.au    |
 |                                                                           |
 | See the files "README" and "COPYING" for further copyright and warranty   |
 | information.                                                              |
 |                                                                           |
 +---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------+
 | Note:                                                                     |
 |    The file contains code which accesses user memory.                     |
 |    Emulator static data may change when user memory is accessed, due to   |
 |    other processes using the emulator while swapping is in progress.      |
 +---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------+
 | math_emulate() is the sole entry point for wm-FPU-emu                     |
 +---------------------------------------------------------------------------*/

#include <linux/signal.h>
#include <linux/segment.h>

#include "fpu_system.h"
#include "fpu_emu.h"
#include "exception.h"
#include "control_w.h"
#include "status_w.h"

#include <asm/segment.h>

#define __BAD__ FPU_illegal   /* Illegal on an 80486, causes SIGILL */

#ifndef NO_UNDOC_CODE    /* Un-documented FPU op-codes supported by default. */

/* WARNING: These codes are not documented by Intel in their 80486 manual
   and may not work on FPU clones or later Intel FPUs. */

/* Changes to support the un-doc codes provided by Linus Torvalds. */

#define _d9_d8_ fstp_i    /* unofficial code (19) */
#define _dc_d0_ fcom_st   /* unofficial code (14) */
#define _dc_d8_ fcompst   /* unofficial code (1c) */
#define _dd_c8_ fxch_i    /* unofficial code (0d) */
#define _de_d0_ fcompst   /* unofficial code (16) */
#define _df_c0_ ffreep    /* unofficial code (07) ffree + pop */
#define _df_c8_ fxch_i    /* unofficial code (0f) */
#define _df_d0_ fstp_i    /* unofficial code (17) */
#define _df_d8_ fstp_i    /* unofficial code (1f) */

static FUNC const st_instr_table[64] = {
  fadd__,   fld_i_,  __BAD__, __BAD__, fadd_i,  ffree_,  faddp_,  _df_c0_,
  fmul__,   fxch_i,  __BAD__, __BAD__, fmul_i,  _dd_c8_, fmulp_,  _df_c8_,
  fcom_st,  fp_nop,  __BAD__, __BAD__, _dc_d0_, fst_i_,  _de_d0_, _df_d0_,
  fcompst,  _d9_d8_, __BAD__, __BAD__, _dc_d8_, fstp_i,  fcompp,  _df_d8_,
  fsub__,   fp_etc,  __BAD__, finit_,  fsubri,  fucom_,  fsubrp,  fstsw_,
  fsubr_,   fconst,  fucompp, __BAD__, fsub_i,  fucomp,  fsubp_,  __BAD__,
  fdiv__,   trig_a,  __BAD__, __BAD__, fdivri,  __BAD__, fdivrp,  __BAD__,
  fdivr_,   trig_b,  __BAD__, __BAD__, fdiv_i,  __BAD__, fdivp_,  __BAD__,
};

#else     /* Support only documented FPU op-codes */

static FUNC const st_instr_table[64] = {
  fadd__,   fld_i_,  __BAD__, __BAD__, fadd_i,  ffree_,  faddp_,  __BAD__,
  fmul__,   fxch_i,  __BAD__, __BAD__, fmul_i,  __BAD__, fmulp_,  __BAD__,
  fcom_st,  fp_nop,  __BAD__, __BAD__, __BAD__, fst_i_,  __BAD__, __BAD__,
  fcompst,  __BAD__, __BAD__, __BAD__, __BAD__, fstp_i,  fcompp,  __BAD__,
  fsub__,   fp_etc,  __BAD__, finit_,  fsubri,  fucom_,  fsubrp,  fstsw_,
  fsubr_,   fconst,  fucompp, __BAD__, fsub_i,  fucomp,  fsubp_,  __BAD__,
  fdiv__,   trig_a,  __BAD__, __BAD__, fdivri,  __BAD__, fdivrp,  __BAD__,
  fdivr_,   trig_b,  __BAD__, __BAD__, fdiv_i,  __BAD__, fdivp_,  __BAD__,
};

#endif NO_UNDOC_CODE


#define _NONE_ 0   /* Take no special action */
#define _REG0_ 1   /* Need to check for not empty st(0) */
#define _REGI_ 2   /* Need to check for not empty st(0) and st(rm) */
#define _REGi_ 0   /* Uses st(rm) */
#define _PUSH_ 3   /* Need to check for space to push onto stack */
#define _null_ 4   /* Function illegal or not implemented */
#define _REGIi 5   /* Uses st(0) and st(rm), result to st(rm) */
#define _REGIp 6   /* Uses st(0) and st(rm), result to st(rm) then pop */
#define _REGIc 0   /* Compare st(0) and st(rm) */
#define _REGIn 0   /* Uses st(0) and st(rm), but handle checks later */

#ifndef NO_UNDOC_CODE

/* Un-documented FPU op-codes supported by default. (see above) */

static unsigned char const type_table[64] = {
  _REGI_, _NONE_, _null_, _null_, _REGIi, _REGi_, _REGIp, _REGi_,
  _REGI_, _REGIn, _null_, _null_, _REGIi, _REGI_, _REGIp, _REGI_,
  _REGIc, _NONE_, _null_, _null_, _REGIc, _REG0_, _REGIc, _REG0_,
  _REGIc, _REG0_, _null_, _null_, _REGIc, _REG0_, _REGIc, _REG0_,
  _REGI_, _NONE_, _null_, _NONE_, _REGIi, _REGIc, _REGIp, _NONE_,
  _REGI_, _NONE_, _REGIc, _null_, _REGIi, _REGIc, _REGIp, _null_,
  _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_,
  _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_
};

#else     /* Support only documented FPU op-codes */

static unsigned char const type_table[64] = {
  _REGI_, _NONE_, _null_, _null_, _REGIi, _REGi_, _REGIp, _null_,
  _REGI_, _REGIn, _null_, _null_, _REGIi, _null_, _REGIp, _null_,
  _REGIc, _NONE_, _null_, _null_, _null_, _REG0_, _null_, _null_,
  _REGIc, _null_, _null_, _null_, _null_, _REG0_, _REGIc, _null_,
  _REGI_, _NONE_, _null_, _NONE_, _REGIi, _REGIc, _REGIp, _NONE_,
  _REGI_, _NONE_, _REGIc, _null_, _REGIi, _REGIc, _REGIp, _null_,
  _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_,
  _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_
};

#endif NO_UNDOC_CODE


/* Be careful when using any of these global variables...
   they might change if swapping is triggered */
unsigned char  FPU_rm;
char	       FPU_st0_tag;
FPU_REG       *FPU_st0_ptr;

/* ######## To be shifted */
unsigned long FPU_entry_op_cs;
unsigned short FPU_data_selector;


#ifdef PARANOID
char emulating=0;
#endif PARANOID

static int valid_prefix(unsigned char *Byte, unsigned char **fpu_eip,
			overrides *override);


asmlinkage void math_emulate(long arg)
{
  unsigned char  FPU_modrm, byte1;
  unsigned short code;
  fpu_addr_modes addr_modes;
  int unmasked;

#ifdef PARANOID
  if ( emulating )
    {
      printk("ERROR: wm-FPU-emu is not RE-ENTRANT!\n");
    }
  RE_ENTRANT_CHECK_ON;
#endif PARANOID

  if (!current->used_math)
    {
      int i;
      for ( i = 0; i < 8; i++ )
	{
	  /* Make sure that the registers are compatible
	     with the assumptions of the emulator. */
	  regs[i].exp = 0;
	  regs[i].sigh = 0x80000000;
	}
      finit();
      current->used_math = 1;
    }

  SETUP_DATA_AREA(arg);

  addr_modes.vm86 = (FPU_EFLAGS & 0x00020000) != 0;

  if ( addr_modes.vm86 )
    FPU_EIP += FPU_CS << 4;

  FPU_ORIG_EIP = FPU_EIP;

  if ( !addr_modes.vm86 )
    {
      /* user code space? */
      if (FPU_CS == KERNEL_CS)
	{
	  printk("math_emulate: %04x:%08lx\n",FPU_CS,FPU_EIP);
	  panic("Math emulation needed in kernel");
	}

      /* We cannot handle multiple segments yet */
      if (FPU_CS != USER_CS || FPU_DS != USER_DS)
	{
	  math_abort(FPU_info,SIGILL);
	}
    }

  FPU_lookahead = 1;
  if (current->flags & PF_PTRACED)
    FPU_lookahead = 0;

  if ( !valid_prefix(&byte1, (unsigned char **)&FPU_EIP,
		     &addr_modes.override) )
    {
      RE_ENTRANT_CHECK_OFF;
      printk("FPU emulator: Unknown prefix byte 0x%02x, probably due to\n"
	     "FPU emulator: self-modifying code! (emulation impossible)\n",
	     byte1);
      RE_ENTRANT_CHECK_ON;
      EXCEPTION(EX_INTERNAL|0x126);
      math_abort(FPU_info,SIGILL);
    }

do_another_FPU_instruction:

  FPU_EIP++;  /* We have fetched the prefix and first code bytes. */

#ifdef PECULIAR_486
  /* It would be more logical to do this only in get_address(),
     but although it is supposed to be undefined for many fpu
     instructions, an 80486 behaves as if this were done here: */
  FPU_data_selector = FPU_DS;
#endif PECULIAR_486

  if ( (byte1 & 0xf8) != 0xd8 )
    {
      if ( byte1 == FWAIT_OPCODE )
	{
	  if (partial_status & SW_Summary)
	    goto do_the_FPU_interrupt;
	  else
	    goto FPU_fwait_done;
	}
#ifdef PARANOID
      EXCEPTION(EX_INTERNAL|0x128);
      math_abort(FPU_info,SIGILL);
#endif PARANOID
    }

  RE_ENTRANT_CHECK_OFF;
  FPU_code_verify_area(1);
  FPU_modrm = get_fs_byte((unsigned short *) FPU_EIP);
  RE_ENTRANT_CHECK_ON;
  FPU_EIP++;

  if (partial_status & SW_Summary)
    {
      /* Ignore the error for now if the current instruction is a no-wait
	 control instruction */
      /* The 80486 manual contradicts itself on this topic,
	 but a real 80486 uses the following instructions:
	 fninit, fnstenv, fnsave, fnstsw, fnstenv, fnclex.
       */
      code = (FPU_modrm << 8) | byte1;
      if ( ! ( (((code & 0xf803) == 0xe003) ||    /* fnclex, fninit, fnstsw */
		(((code & 0x3003) == 0x3001) &&   /* fnsave, fnstcw, fnstenv,
						     fnstsw */
		 ((code & 0xc000) != 0xc000))) ) )
	{
	  /*
	   *  We need to simulate the action of the kernel to FPU
	   *  interrupts here.
	   *  Currently, the "real FPU" part of the kernel (0.99.10)
	   *  clears the exception flags, sets the registers to empty,
	   *  and passes information back to the interrupted process
	   *  via the cs selector and operand selector, so we do the same.
	   */
	do_the_FPU_interrupt:
	  cs_selector &= 0xffff0000;
	  cs_selector |= status_word();
      	  operand_selector = tag_word();
	  partial_status = 0;
	  top = 0;
	  {
	    int r;
	    for (r = 0; r < 8; r++)
	      {
		regs[r].tag = TW_Empty;
	      }
	  }

	  RE_ENTRANT_CHECK_OFF;
	  current->tss.trap_no = 16;
	  current->tss.error_code = 0;
	  send_sig(SIGFPE, current, 1);
	  return;
	}
    }

  FPU_entry_eip = FPU_ORIG_EIP;

  FPU_entry_op_cs = (byte1 << 24) | (FPU_modrm << 16) | (FPU_CS & 0xffff) ;

  FPU_rm = FPU_modrm & 7;

  if ( FPU_modrm < 0300 )
    {
      /* All of these instructions use the mod/rm byte to get a data address */
      if ( addr_modes.vm86
	  ^ (addr_modes.override.address_size == ADDR_SIZE_PREFIX) )
	get_address_16(FPU_modrm, &FPU_EIP, addr_modes);
      else
	get_address(FPU_modrm, &FPU_EIP, addr_modes);
      if ( !(byte1 & 1) )
	{
	  unsigned short status1 = partial_status;
	  FPU_st0_ptr = &st(0);
	  FPU_st0_tag = FPU_st0_ptr->tag;

	  /* Stack underflow has priority */
	  if ( NOT_EMPTY_0 )
	    {
	      unmasked = 0;  /* Do this here to stop compiler warnings. */
	      switch ( (byte1 >> 1) & 3 )
		{
		case 0:
		  unmasked = reg_load_single();
		  break;
		case 1:
		  reg_load_int32();
		  break;
		case 2:
		  unmasked = reg_load_double();
		  break;
		case 3:
		  reg_load_int16();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美成人一区二区三区| 在线欧美小视频| 成人av电影免费在线播放| 91免费在线视频观看| 欧美日韩国产a| 久久亚洲一区二区三区明星换脸 | 亚洲综合一区二区精品导航| 日韩av中文在线观看| 国产成人av电影| 在线观看国产一区二区| 日韩美女在线视频| 亚洲乱码日产精品bd| 蜜臀av国产精品久久久久| 国产iv一区二区三区| 欧美最猛性xxxxx直播| 精品国产露脸精彩对白| 亚洲日本在线视频观看| 裸体健美xxxx欧美裸体表演| 成人午夜视频网站| 7878成人国产在线观看| 国产精品久久久久久妇女6080| 午夜视频久久久久久| 国产精品亚洲综合一区在线观看| 欧洲亚洲精品在线| 久久久久久久综合狠狠综合| 亚洲国产裸拍裸体视频在线观看乱了| 精品一区二区三区日韩| 一本久道久久综合中文字幕| 日韩免费视频线观看| 一区二区三区91| 国产成人在线免费观看| 欧美一卡2卡3卡4卡| 亚洲伦理在线免费看| 国内精品伊人久久久久av一坑| 色域天天综合网| 久久久久9999亚洲精品| 日韩黄色免费电影| 91日韩在线专区| 久久亚洲捆绑美女| 美日韩一区二区| 欧美色网一区二区| |精品福利一区二区三区| 国产专区综合网| 日韩免费高清电影| 日韩经典一区二区| 欧美视频在线一区| 亚洲人成伊人成综合网小说| 国产.欧美.日韩| 久久综合五月天婷婷伊人| 日日夜夜精品视频免费| 欧美优质美女网站| 亚洲欧美另类在线| 成人短视频下载| 国产喂奶挤奶一区二区三区| 久久99精品久久久久久| 日韩一区二区三免费高清| 午夜日韩在线观看| 欧美午夜影院一区| 亚洲综合一区二区三区| 一本色道综合亚洲| 亚洲欧美色一区| 91一区二区在线| 亚洲天堂久久久久久久| 成人avav影音| 国产精品久久久久久久久免费桃花| 激情图区综合网| 精品久久久网站| 久久成人综合网| 日韩精品影音先锋| 久久99精品一区二区三区| 日韩欧美中文字幕一区| 蜜臀久久99精品久久久画质超高清 | 欧美日韩精品是欧美日韩精品| 亚洲精品精品亚洲| 色狠狠桃花综合| 一区二区三区欧美日韩| 欧美亚洲免费在线一区| 亚洲高清中文字幕| 欧美日韩国产综合久久| 日韩在线一区二区三区| 欧美一区二区成人6969| 国产综合一区二区| 久久久精品影视| 不卡av在线免费观看| 亚洲视频在线一区| 精品视频一区二区三区免费| 日韩va欧美va亚洲va久久| 精品免费日韩av| 国产精品69毛片高清亚洲| 国产女人18水真多18精品一级做| 国产成人精品免费视频网站| 国产精品国产三级国产普通话三级| 99久久综合狠狠综合久久| 亚洲精品伦理在线| 欧美精品久久99| 国产做a爰片久久毛片| 国产精品不卡视频| 欧美三级中文字| 久久狠狠亚洲综合| 欧美国产欧美综合| 欧美性猛片aaaaaaa做受| 日韩成人免费在线| 亚洲国产精品二十页| 99re6这里只有精品视频在线观看| 亚洲一区二区三区中文字幕 | 久热成人在线视频| 日本一区二区三区四区| 在线一区二区三区四区| 久久成人麻豆午夜电影| 国产精品丝袜91| 欧美日韩国产电影| 国产美女精品一区二区三区| 亚洲视频资源在线| 日韩一级大片在线观看| 成人午夜av电影| 亚洲成人av一区二区三区| 精品va天堂亚洲国产| 一本到不卡免费一区二区| 青青草97国产精品免费观看| 国产精品美女www爽爽爽| 欧美三级韩国三级日本一级| 激情综合网最新| 亚洲激情图片小说视频| 欧美成人猛片aaaaaaa| 91在线丨porny丨国产| 日韩av二区在线播放| 成人免费在线观看入口| 日韩欧美第一区| 91福利精品第一导航| 国内精品伊人久久久久av影院 | 欧美性受xxxx| 国产成人综合在线| 亚洲成av人片一区二区三区| 日本一区二区久久| 91精品国产综合久久久久久| 成人精品免费视频| 麻豆精品视频在线| 亚洲激情图片小说视频| 国产亚洲欧美一区在线观看| 欧美日韩国产精品自在自线| 99久久99久久免费精品蜜臀| 麻豆免费精品视频| 亚洲午夜激情av| 亚洲欧洲成人自拍| 久久久久国产精品麻豆ai换脸| 欧美久久久久久蜜桃| 99久久99久久精品国产片果冻| 寂寞少妇一区二区三区| 亚洲va韩国va欧美va精品| 亚洲天堂中文字幕| 亚洲国产成人一区二区三区| 欧美一级欧美三级| 欧美色偷偷大香| 91美女在线观看| 99久久久久久99| 国产精品一二三在| 久久国产综合精品| 首页欧美精品中文字幕| 玉米视频成人免费看| 国产精品久久久久aaaa| 国产亚洲成年网址在线观看| 欧美电影精品一区二区| 欧美精品vⅰdeose4hd| 色欧美片视频在线观看在线视频| 成人午夜免费电影| 国产成人免费在线视频| 韩国理伦片一区二区三区在线播放| 日韩成人av影视| 三级亚洲高清视频| 午夜久久久久久久久久一区二区| 亚洲精品欧美综合四区| 中文字幕五月欧美| 中文字幕一区二| 亚洲欧洲国产日韩| 成人欧美一区二区三区小说| 中文字幕在线不卡国产视频| 国产精品美女久久久久久2018 | 成人高清免费观看| 国产成人av网站| 国产一区不卡视频| 国产乱对白刺激视频不卡 | 国产色婷婷亚洲99精品小说| 久久综合九色综合欧美就去吻| 精品国产网站在线观看| 欧美成人精品二区三区99精品| 日韩午夜av一区| 欧美r级在线观看| 26uuu久久综合| 国产亚洲成年网址在线观看| 中文乱码免费一区二区 | 欧洲视频一区二区| 欧美色视频在线| 欧美一区二区三区影视| 日韩三级电影网址| 久久亚洲精品国产精品紫薇| 国产欧美一区二区精品性| 中文字幕 久热精品 视频在线 | 色综合天天做天天爱| 色哟哟国产精品| 欧美日韩国产高清一区二区三区|