您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vfp_raise_exceptions函数代码示例

51自学网 2021-06-03 09:38:17
  C++
这篇教程C++ vfp_raise_exceptions函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vfp_raise_exceptions函数的典型用法代码示例。如果您正苦于以下问题:C++ vfp_raise_exceptions函数的具体用法?C++ vfp_raise_exceptions怎么用?C++ vfp_raise_exceptions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vfp_raise_exceptions函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: VFP_bounce

void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs){	u32 fpscr, orig_fpscr, fpsid, exceptions;	pr_debug("VFP: bounce: trigger %08x fpexc %08x/n", trigger, fpexc);	atomic64_inc(&vfp_bounce_count);	fmxr(FPEXC, fpexc & ~(FPEXC_EX|FPEXC_DEX|FPEXC_FP2V|FPEXC_VV|FPEXC_TRAP_MASK));	fpsid = fmrx(FPSID);	orig_fpscr = fpscr = fmrx(FPSCR);	if ((fpsid & FPSID_ARCH_MASK) == (1 << FPSID_ARCH_BIT)	    && (fpscr & FPSCR_IXE)) {		goto emulate;	}	if (fpexc & FPEXC_EX) {#ifndef CONFIG_CPU_FEROCEON		trigger = fmrx(FPINST);		regs->ARM_pc -= 4;#endif	} else if (!(fpexc & FPEXC_DEX)) {		 vfp_raise_exceptions(VFP_EXCEPTION_ERROR, trigger, fpscr, regs);		goto exit;	}	if (fpexc & (FPEXC_EX | FPEXC_VV)) {		u32 len;		len = fpexc + (1 << FPEXC_LENGTH_BIT);		fpscr &= ~FPSCR_LENGTH_MASK;		fpscr |= (len & FPEXC_LENGTH_MASK) << (FPSCR_LENGTH_BIT - FPEXC_LENGTH_BIT);	}	exceptions = vfp_emulate_instruction(trigger, fpscr, regs);	if (exceptions)		vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs);	/*	 * If there isn't a second FP instruction, exit now. Note that	 * the FPEXC.FP2V bit is valid only if FPEXC.EX is 1.	 */	if ((fpexc & (FPEXC_EX | FPEXC_FP2V)) != (FPEXC_EX | FPEXC_FP2V))		goto exit;	barrier();	trigger = fmrx(FPINST2); emulate:	exceptions = vfp_emulate_instruction(trigger, orig_fpscr, regs);	if (exceptions)		vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs); exit:	preempt_enable();}
开发者ID:MarcoMas6,项目名称:android_kernel_htc_liberty-villec2,代码行数:57,


示例2: VFPCDP

unsignedVFPCDP (ARMul_State * state, unsigned type, ARMword instr){	/* CDP<c> <coproc>,<opc1>,<CRd>,<CRn>,<CRm>,<opc2> */	int CoProc = BITS (8, 11); /* 10 or 11 */	int OPC_1 = BITS (20, 23);	int CRd = BITS (12, 15);	int CRn = BITS (16, 19);	int CRm = BITS (0, 3);	int OPC_2 = BITS (5, 7);		/* TODO check access permission */		/* CRn/opc1 CRm/opc2 */	if (CoProc == 10 || CoProc == 11)	{		#define VFP_CDP_TRANS		#include "core/arm/interpreter/vfp/vfpinstr.cpp"		#undef VFP_CDP_TRANS				int exceptions = 0;		if (CoProc == 10)			exceptions = vfp_single_cpdo(state, instr, state->VFP[VFP_OFFSET(VFP_FPSCR)]);		else 			exceptions = vfp_double_cpdo(state, instr, state->VFP[VFP_OFFSET(VFP_FPSCR)]);		vfp_raise_exceptions(state, exceptions, instr, state->VFP[VFP_OFFSET(VFP_FPSCR)]);		return ARMul_DONE;	}	DEBUG_LOG(ARM11, "Can't identify %x/n", instr);	return ARMul_CANT;}
开发者ID:Antidote,项目名称:citra,代码行数:34,


示例3: VFP_bounce

/* * Package up a bounce condition. */void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs){	u32 fpscr, orig_fpscr, fpsid, exceptions;	pr_debug("VFP: bounce: trigger %08x fpexc %08x/n", trigger, fpexc);	/*	 * At this point, FPEXC can have the following configuration:	 *	 *  EX DEX IXE	 *  0   1   x   - synchronous exception	 *  1   x   0   - asynchronous exception	 *  1   x   1   - sychronous on VFP subarch 1 and asynchronous on later	 *  0   0   1   - synchronous on VFP9 (non-standard subarch 1	 *                implementation), undefined otherwise	 *	 * Clear various bits and enable access to the VFP so we can	 * handle the bounce.	 */	fmxr(FPEXC, fpexc & ~(FPEXC_EX|FPEXC_DEX|FPEXC_FP2V|FPEXC_VV|FPEXC_TRAP_MASK));	fpsid = fmrx(FPSID);	orig_fpscr = fpscr = fmrx(FPSCR);	/*	 * Check for the special VFP subarch 1 and FPSCR.IXE bit case	 */	if ((fpsid & FPSID_ARCH_MASK) == (1 << FPSID_ARCH_BIT)	    && (fpscr & FPSCR_IXE)) {		/*		 * Synchronous exception, emulate the trigger instruction		 */		goto emulate;	}	if (fpexc & FPEXC_EX) {#ifndef CONFIG_CPU_FEROCEON		/*		 * Asynchronous exception. The instruction is read from FPINST		 * and the interrupted instruction has to be restarted.		 */		trigger = fmrx(FPINST);		regs->ARM_pc -= 4;#endif	} else if (!(fpexc & FPEXC_DEX)) {		/*		 * Illegal combination of bits. It can be caused by an		 * unallocated VFP instruction but with FPSCR.IXE set and not		 * on VFP subarch 1.		 */		 vfp_raise_exceptions(VFP_EXCEPTION_ERROR, trigger, fpscr, regs);		goto exit;	}	/*	 * Modify fpscr to indicate the number of iterations remaining.	 * If FPEXC.EX is 0, FPEXC.DEX is 1 and the FPEXC.VV bit indicates	 * whether FPEXC.VECITR or FPSCR.LEN is used.	 */	if (fpexc & (FPEXC_EX | FPEXC_VV)) {		u32 len;		len = fpexc + (1 << FPEXC_LENGTH_BIT);		fpscr &= ~FPSCR_LENGTH_MASK;		fpscr |= (len & FPEXC_LENGTH_MASK) << (FPSCR_LENGTH_BIT - FPEXC_LENGTH_BIT);	}	/*	 * Handle the first FP instruction.  We used to take note of the	 * FPEXC bounce reason, but this appears to be unreliable.	 * Emulate the bounced instruction instead.	 */	exceptions = vfp_emulate_instruction(trigger, fpscr, regs);	if (exceptions)		vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs);	/*	 * If there isn't a second FP instruction, exit now. Note that	 * the FPEXC.FP2V bit is valid only if FPEXC.EX is 1.	 */	if ((fpexc & (FPEXC_EX | FPEXC_FP2V)) != (FPEXC_EX | FPEXC_FP2V))		goto exit;	/*	 * The barrier() here prevents fpinst2 being read	 * before the condition above.	 */	barrier();	trigger = fmrx(FPINST2); emulate:	exceptions = vfp_emulate_instruction(trigger, orig_fpscr, regs);	if (exceptions)		vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs); exit:	preempt_enable();//.........这里部分代码省略.........
开发者ID:InhyukYee,项目名称:PeanutButterWolf,代码行数:101,


示例4: VFP9_bounce

/* * Package up a bounce condition. */void VFP9_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs){	u32 fpscr, orig_fpscr, exceptions, inst;	pr_debug("VFP: bounce: trigger %08x fpexc %08x/n", trigger, fpexc);	/*	 * Enable access to the VFP so we can handle the bounce.	 */	fmxr(FPEXC, fpexc & ~(FPEXC_EX|FPEXC_INV|FPEXC_UFC|FPEXC_IOC));	orig_fpscr = fpscr = fmrx(FPSCR);	/*	 * If we are running with inexact exceptions enabled, we need to	 * emulate the trigger instruction.  Note that as we're emulating	 * the trigger instruction, we need to increment PC.	 */	if (fpscr & FPSCR_IXE) {		regs->ARM_pc += 4;		goto emulate;	}	barrier();	/*	 * Modify fpscr to indicate the number of iterations remaining	 */	if (fpexc & FPEXC_EX) {		u32 len;		len = fpexc + (1 << FPEXC_LENGTH_BIT);		fpscr &= ~FPSCR_LENGTH_MASK;		fpscr |= (len & FPEXC_LENGTH_MASK) << (FPSCR_LENGTH_BIT - FPEXC_LENGTH_BIT);	}	/*	 * Handle the first FP instruction.  We used to take note of the	 * FPEXC bounce reason, but this appears to be unreliable.	 * Emulate the bounced instruction instead.	 */#ifndef CONFIG_VFPv3	inst = fmrx(FPINST);#else	inst = trigger;#endif	exceptions = vfp_emulate_instruction(inst, fpscr, regs);	if (exceptions)		vfp_raise_exceptions(exceptions, inst, orig_fpscr, regs);#ifndef CONFIG_VFPv3	/*	 * If there isn't a second FP instruction, exit now.	 */	if (!(fpexc & FPEXC_FPV2))		return;	/*	 * The barrier() here prevents fpinst2 being read	 * before the condition above.	 */	barrier();	trigger = fmrx(FPINST2);	orig_fpscr = fpscr = fmrx(FPSCR);#else	return;#endif emulate:	exceptions = vfp_emulate_instruction(trigger, fpscr, regs);	if (exceptions)		vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs);}
开发者ID:guihaizi528,项目名称:linux-davinci-2.6,代码行数:77,



注:本文中的vfp_raise_exceptions函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vfp_raise_sigfpe函数代码示例
C++ vfp_pm_init函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。