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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fpparchlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* fppArchLib.c - floating-point coprocessor support library *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01j,25mar02,hdn  added two APIs to detect illegal FPU usage (spr 70187)01i,20nov01,hdn  doc clean up for 5.501h,21aug01,hdn  imported SSE support from T31 ver 01k01g,21apr99,hdn  changed selector of the emulator exception handler.01f,14jun95,hdn  added support for fpp emulation library from USS.01e,25may95,ms   added fppRegsToCtx and fppCtxToRegs.01d,10aug93,hdn  added two global variables for fppProbeSup().01c,03jun93,hdn  updated to 5.1		  - moved fppInit(), fppCreateHook(), fppSwapHook(),		    fppTaskRegsShow() to src/all/fppLib.c.  		  - changed to pointer to floating-point register to 		    fppTasksRegs{S,G}et().		  - added arrays fpRegIndex[], fpCtlRegIndex[].		  - added fppArchTastInit().  		  - included regs.h, intLib.h.                  - changed functions to ansi style		  - changed VOID to void01b,29sep92,hdn  fixed a bug.01a,07apr92,hdn  written based on TRON version.*//*DESCRIPTIONThis library provides a low-level interface to the Intel ArchitectureFloating-Point Unit (FPU).  Routines fppTaskRegsShow(), fppTaskRegsSet(),and fppTaskRegsGet() inspect and set coprocessor registers on a per taskbasis.  The routine fppProbe() checks for the presence of theIntel Architecture FPU.  With the exception of fppProbe(), the higherlevel facilities in dbgLib and usrLib should be used instead of theseroutines.There are two kind of floating-point contexts and set of routines for each kind.  One is 108 bytes for older FPU (i80387, i80487, Pentium) and older MMX technology and fppSave(), fppRestore(), fppRegsToCtx(), and fppCtxToRegs() are used to save and restore the context, convert to or from the FPPREG_SET.The other is 512 bytes for newer FPU, newer MMX technology and streaming SIMD technology (PentiumII, III, 4) and fppXsave(), fppXrestore(), fppXregsToCtx(), and fppXctxToRegs() are used to save and restore the context, convert to or from the FPPREG_SET.  Which to use is automatically detected by checking CPUID information in fppArchInit().  And fppTaskRegsSet() and fppTaskRegsGet() access the appropriate floating-point context.  The bit interrogated for the automatic detection is the "Fast Save and Restore" feature flag.INITIALIZATIONTo activate floating-point support, fppInit() must be called before anytasks using the coprocessor are spawned.  If INCLUDE_FLOATING_POINT isdefined in configAll.h, this is done by the root task, usrRoot(), inusrConfig.c.VX_FP_TASK OPTION Saving and restoring floating-point registers adds to the context switchtime of a task.Therefore, floating-point registers are \f2not\fP saved and restored for \f2every\fP task.  Only those tasks spawned with the task option VX_FP_TASKwill have floating-point state, MMX technology state, and streaming SIMD state saved and restored.  \f3NOTE:\fP  If a task does any floating-point operations, MMX operations,and streaming SIMD operation, it must be spawned with VX_FP_TASK.It is deadly to execute any floating-point operations in a task spawned without VX_FP_TASK option, and very difficult to find.  To detect thatillegal/unintentional/accidental floating-point operations, a new API andmechanism is added.  The mechanism is to enable or disable the FPU by toggling the TS flag in the CR0 in the new task switch hook routine -fppArchSwitchHook() - respecting the VX_FP_TASK option.  If VX_FP_TASKoption is not set in the switching-in task, the FPU is disabled.  Thusthe device-not-available exception will be raised if that task does any floating-point operations.  This mechanism is disabled in the default.To enable, call the enabler - fppArchSwitchHookEnable() - with a parameter TRUE(1).  A parameter FALSE(0) disables the mechanism.MIXING MMX AND FPU INSTRUCTIONSA task with VX_FP_TASK option saves and restores the FPU and MMX statewhen performing a context switch.  Therefore, the application does nothave to save or restore the FPU and MMX state if the FPU and MMX instructions are not mixed within a task.  Because the MMX registersare aliased to the FPU registers, care must be taken when makingtransitions between FPU instructions and MMX instructions to preventthe loss of data in the FPU and MMX registers and to prevent incoherentor unexpected result.  When mixing MMX and FPU instructions within a task, follow these guidelines from Intel:    - Keep the code in separate modules, procedures, or routines.    - Do not rely on register contents across transitions between FPU      and MMX code modules.    - When transitioning between MMX code and FPU code, save the MMX      register state (if it will be needed in the future) and execute      an EMMS instruction to empty the MMX state.    - When transitioning between FPU and MMX code, save the FPU state,      if it will be needed in the future.MIXING SSE/SSE2 AND FPU/MMX INSTRUCTIONSThe XMM registers and the FPU/MMX registers represent separate execution environments, which has certain ramifications when executingSSE, SSE2, MMX and FPU instructions in the same task context:    - Those SSE and SSE2 instruction that operate only on the XMM       registers (such as the packed and scalar floating-point      instructions and the 128-bit SIMD integer instructions) can be      executed in the same instruction stream with 64-bit SIMD integer      or FPU instructions without any restrictions.  For example, an      application can perform the majority of its floating-point       computations in the XMM registers, using the packed and scalar      floating-point instructions, and at the same time use the FPU      to perform trigonometric and other transcendental computations.      Likewise, an application can perform packed 64-bit and 128-bit      SIMD integer operations can be executed together without      restrictions.    - Those SSE and SSE2 instructions that operate on MMX registers      (such as the CVTPS2PI, CVTTPS2PI, CVTPI2PS, CVTPD2PI, CVTTPD2PI,      CVTPI2PD, MOVDQ2Q, MOVQ2DQ, PADDQ, and PSUBQ instructions) can      also be executed in the same instruction stream as 64-bit SIMD      integer or FPU instructions, however, here they subject to the      restrictions on the simultaneous use of MMX and FPU instructions,      which mentioned in the previous paragraph.INTERRUPT LEVELFloating-point registers are \f2not\fP saved and restored for interruptservice routines connected with intConnect().  However, if necessary,an interrupt service routine can save and restore floating-point registersby calling routines in fppALib.  See the manual entry for intConnect() formore information.EXCEPTIONSThere are six FPU exceptions that can send an exception to the CPU.  They are controlled by Exception Mask bits of the Control Word register.  VxWorks disables them in the default configuration.  Theyare:    - Precision    - Overflow    - Underflow    - Division by zero    - Denormalized operand    - Invalid Operation  SEE ALSO: fppALib, intConnect(), Intel Architecture Software Developer's Manual*/#include "vxWorks.h"#include "objLib.h"#include "taskLib.h"#include "taskArchLib.h"#include "memLib.h"#include "string.h"#include "iv.h"#include "intLib.h"#include "regs.h"#include "fppLib.h"#include "vxLib.h"#include "taskHookLib.h"/* externals */IMPORT CPUID	sysCpuId;IMPORT int	sysCsExc;IMPORT void	intVecSet2 (FUNCPTR * vec, FUNCPTR func, int idtGate, \			    int idtSelector);/* globals */REG_INDEX fpRegName [] =	/* FP non-control register name and offset */    {    {"st/mm0",	FPREG_FPX(0)},    {"st/mm1",	FPREG_FPX(1)},    {"st/mm2",	FPREG_FPX(2)},    {"st/mm3",	FPREG_FPX(3)},    {"st/mm4",	FPREG_FPX(4)},    {"st/mm5",	FPREG_FPX(5)},    {"st/mm6",	FPREG_FPX(6)},    {"st/mm7",	FPREG_FPX(7)},    {NULL, 0},    };REG_INDEX fpCtlRegName [] =	/* FP control register name and offset */    {    {"fpcr",	FPREG_FPCR},    {"fpsr",	FPREG_FPSR},    {"fptag",	FPREG_FPTAG},    {"op",	FPREG_OP},    {"ip",	FPREG_IP},    {"cs",	FPREG_CS},    {"dp",	FPREG_DP},    {"ds",	FPREG_DS},    {NULL, 0},    };int fppFsw = 0;int fppFcw = 0;VOIDFUNCPTR emu387Func	= NULL;		/* func ptr to trap handler */VOIDFUNCPTR emuInitFunc	= NULL;		/* func ptr to initializer */VOIDFUNCPTR _func_fppSaveRtn = NULL;	/* func ptr to fppSave/fppXsave */VOIDFUNCPTR _func_fppRestoreRtn = NULL; /* func ptr to fppRestore/fppXrestore *//* locals */LOCAL FP_CONTEXT * pFppInitContext;	/* pointer to initial FP context *//********************************************************************************* fppArchInit - initialize floating-point coprocessor support** This routine must be called before using the floating-point coprocessor.* It is typically called from fppInit().  ** NOMANUAL*/void fppArchInit (void)    {        /* initialize the function pointer and the CR4 OSFXSR bit */    if (sysCpuId.featuresEdx & CPUID_FXSR)	{	_func_fppSaveRtn = fppXsave;		/* new FP save routine */	_func_fppRestoreRtn = fppXrestore;	/* new FP restore routine */	vxCr4Set (vxCr4Get () | CR4_OSFXSR);	/* set OSFXSR bit */	}    else	{	_func_fppSaveRtn = fppSave;		/* old FP save routine */	_func_fppRestoreRtn = fppRestore;	/* old FP restore routine */	vxCr4Set (vxCr4Get () & ~CR4_OSFXSR);	/* clear OSFXSR bit */	}    fppCreateHookRtn = (FUNCPTR) NULL;    /* allocate and initialize the initial FP_CONTEXT */    pFppInitContext = (FP_CONTEXT *) memalign \				     (_CACHE_ALIGN_SIZE, sizeof (FP_CONTEXT));    (*_func_fppSaveRtn) (pFppInitContext);    }/********************************************************************************* fppArchTaskCreateInit - initialize floating-point coprocessor support for task** INTERNAL* It might seem odd that we use a bcopy() to initialize the floating point* context when a fppSave() of an idle frame would accomplish the same thing* without the cost of a 108/512 byte data structure.  The problem is that we* are not guaranteed to have an idle frame.  Consider the following scenario:* a floating point task is midway through a floating point instruction when* it is preempted by a *non-floting point* task.  In this case the swap-in* hook does not save the coprocessor state as an optimization.  Now if we* create a floating point task the initial coprocessor frame would not be* idle but rather mid-instruction.  To make matters worse when get around* to saving the original fp task's floating point context frame, it would be* incorrectly saved as idle!  One solution would be to fppSave() once to* the original fp task's context, then fppSave() an idle frame to the new task,* and finally restore the old fp task's context (in case we return to it* before another fp task).  The problem with this approach is that it is* *slow* and considering the fact that preemption is locked, the 108/512 bytes* don't look so bad anymore.  Indeed, when this approach is adopted by all* architectures we will not need to lock out preemption anymore.** NOMANUAL*/void fppArchTaskCreateInit    (    FP_CONTEXT * pFpContext		/* pointer to FP_CONTEXT */    )    {    if (sysCpuId.featuresEdx & CPUID_FXSR)	{	bcopyLongs ((char *) pFppInitContext, (char *)pFpContext,	            (sizeof (FPX_CONTEXT) >> 2));	/* copy 512>>2 longs */	}    else	{	bcopyLongs ((char *) pFppInitContext, (char *)pFpContext,	            (sizeof (FPO_CONTEXT) >> 2));	/* copy 108>>2 longs */	}    }/******************************************************************************** fppRegsToCtx - convert FPREG_SET to FPO_CONTEXT.*/ void fppRegsToCtx    (    FPREG_SET *  pFpRegSet,             /* input -  fpp reg set */    FP_CONTEXT * pFpContext             /* output - fpp context */    )    {    int ix;    for (ix = 0; ix < FP_NUM_REGS; ix++)        fppDtoDx ((DOUBLEX *)&pFpContext->u.o.fpx[ix],                   (double *)&pFpRegSet->fpx[ix]);    pFpContext->u.o.fpcr  = pFpRegSet->fpcr;    pFpContext->u.o.fpsr  = pFpRegSet->fpsr;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区免费在线观看| 不卡区在线中文字幕| 在线欧美小视频| 亚洲欧洲一区二区在线播放| 国产麻豆成人精品| 久久久精品2019中文字幕之3| 久久99久久精品| 日韩限制级电影在线观看| 国产精品拍天天在线| 91在线观看成人| **网站欧美大片在线观看| av午夜一区麻豆| 国产精品久久一卡二卡| eeuss鲁片一区二区三区在线观看| 欧美国产综合一区二区| 成人一道本在线| 亚洲伦在线观看| 欧美怡红院视频| 亚洲一区av在线| 欧美一区日本一区韩国一区| 狂野欧美性猛交blacked| 欧美电影免费观看高清完整版| 黄页视频在线91| 久久久噜噜噜久久人人看| 成人午夜伦理影院| 亚洲精品国产第一综合99久久| 日本高清不卡一区| 免费成人av在线播放| 国产亚洲短视频| 国产69精品一区二区亚洲孕妇| 国产精品免费av| 色成人在线视频| 奇米精品一区二区三区在线观看| 日韩欧美成人午夜| 国产a精品视频| 亚洲第一在线综合网站| 精品国产自在久精品国产| 不卡一二三区首页| 一区二区三区四区中文字幕| 成人网男人的天堂| 亚洲福利一区二区| 国产视频一区在线观看| 欧美三片在线视频观看 | 奇米影视在线99精品| 精品日韩一区二区三区免费视频| 成人午夜伦理影院| 日韩av一区二区在线影视| 久久久久久免费| 色av成人天堂桃色av| 色老综合老女人久久久| 日韩一级大片在线| 日本一区二区视频在线观看| 国产精品看片你懂得 | 337p日本欧洲亚洲大胆色噜噜| 国产精品看片你懂得| 精品在线视频一区| 欧美xxxxxxxx| 午夜电影一区二区三区| 东方aⅴ免费观看久久av| 欧美日韩国产免费一区二区 | 亚洲人成网站影音先锋播放| 欧美剧情电影在线观看完整版免费励志电影 | 欧美日韩国产综合一区二区三区 | 久久免费视频一区| 欧美久久高跟鞋激| 91久久国产综合久久| 国产精品自拍网站| 亚洲在线免费播放| 亚洲黄色小说网站| 国产欧美日韩在线| 欧美日韩一级黄| 欧美在线观看一区二区| 成人免费黄色大片| 国模大尺度一区二区三区| 伦理电影国产精品| 日韩精品免费视频人成| 亚洲h动漫在线| 亚洲r级在线视频| 亚洲精品视频免费看| 亚洲色图视频网站| 国产精品视频在线看| 日韩免费一区二区三区在线播放| 欧美久久久久中文字幕| 欧美欧美欧美欧美首页| 欧美三级电影精品| 国产亚洲自拍一区| 日韩视频免费观看高清完整版在线观看| 欧美视频三区在线播放| 在线看不卡av| 欧美亚洲国产一区在线观看网站| 99精品国产一区二区三区不卡| av在线播放一区二区三区| 国产一区二区在线观看视频| 美国毛片一区二区| 久久国产麻豆精品| 精品一区二区三区久久久| 美女免费视频一区| 五月婷婷激情综合网| 亚洲综合激情网| 亚洲成人第一页| 婷婷国产v国产偷v亚洲高清| 午夜精品福利视频网站| 日韩—二三区免费观看av| 日日摸夜夜添夜夜添亚洲女人| 日韩精品一级二级| 免费在线看成人av| 五月婷婷激情综合| 婷婷综合另类小说色区| 免费一区二区视频| 国产一区福利在线| 国产精华液一区二区三区| 国产91丝袜在线观看| 不卡视频免费播放| 在线视频欧美精品| 日韩一区二区三区三四区视频在线观看| 日韩久久精品一区| 久久久亚洲国产美女国产盗摄| 国产欧美日韩精品a在线观看| 国产精品麻豆视频| 亚洲国产成人av| 蜜臀av国产精品久久久久| 国产一区二区三区黄视频| 黑人巨大精品欧美一区| 99久久99久久精品国产片果冻| 91一区二区在线观看| 欧美人动与zoxxxx乱| 国产视频一区在线观看 | 国产一区二区不卡在线| 成人av网站在线观看| 欧美性色欧美a在线播放| 欧美一区二区观看视频| 国产农村妇女精品| 亚洲色图第一区| 久久国产成人午夜av影院| 波多野洁衣一区| 91精品婷婷国产综合久久竹菊| 国产三级精品在线| 中文字幕一区二区三区四区| 亚洲天堂福利av| 韩国成人福利片在线播放| 在线国产亚洲欧美| 欧美精品一区二| 午夜精品在线视频一区| 成人综合在线网站| 欧美一区二区免费视频| 亚洲日本va午夜在线电影| 蜜臀精品久久久久久蜜臀| 成人免费视频视频| 91精品国产一区二区人妖| 国产精品国产三级国产aⅴ原创| 日韩黄色小视频| 99麻豆久久久国产精品免费| 欧美一区二区三区系列电影| 亚洲欧洲日本在线| 国内一区二区在线| 亚洲激情图片一区| 国产一区啦啦啦在线观看| 欧美成人精品3d动漫h| 三级欧美在线一区| 欧美性一二三区| 亚洲午夜免费福利视频| 色婷婷av一区| 亚洲曰韩产成在线| 欧美日韩国产欧美日美国产精品| 亚洲精品国产视频| 欧美撒尿777hd撒尿| 亚洲第一福利一区| 7777精品久久久大香线蕉| 肉肉av福利一精品导航| 欧美日韩视频在线观看一区二区三区| 亚洲一区二区视频在线观看| 欧美专区在线观看一区| 亚洲国产美女搞黄色| 欧美日韩的一区二区| 丝袜美腿亚洲一区二区图片| 欧美剧情电影在线观看完整版免费励志电影| 亚洲第一搞黄网站| 日韩午夜精品电影| 国产一区中文字幕| 国产精品美女久久久久aⅴ| 国产精品亚洲第一区在线暖暖韩国| 国产日产亚洲精品系列| 成人免费精品视频| 亚洲一区免费在线观看| 在线不卡欧美精品一区二区三区| 蜜桃久久精品一区二区| 久久久亚洲综合| 91麻豆高清视频| 奇米影视一区二区三区小说| 国产亚洲欧美激情| 99在线精品一区二区三区| 亚洲一区国产视频| 日韩一二三四区| 99免费精品视频| 日韩激情一二三区| 久久影院午夜论| 色av成人天堂桃色av| 久久99这里只有精品| 中文字幕一区视频| 欧美一区二区三区免费在线看|