⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cprt.s

📁 上传linux-jx2410的源代码
💻 S
字号:
/*The FP structure has 4 words reserved for each register, the first is usedjustfor the sign in bit 31, the second and third are for the mantissa (unsignedinteger, high 32 bit first) and the fourth is the exponent (signed integer).The mantissa is always normalized.If the exponent is 0x80000000, that is the most negative value, the numberrepresented is 0 and both mantissa words are also 0.If the exponent is 0x7fffffff, that is the biggest positive value, thenumberrepresented is infinity if the high 32 mantissa bit are also 0, otherwise itisa NaN. The low 32 mantissa bit are 0 if the number represented is infinity.Decimal and packed decimal numbers are not supported yet.*//*---------------------------------------------------------------------------*/	.text	.globl	CPRT_fltCPRT_flt:	add	r0,r13,r0,lsr#10	ldr	r2,[r0]	mov	r3,#0	cmp	r2,#0	beq	CPRT_flt_zero		ands	r0,r2,#0x80000000	rsbne	r2,r2,#0	mov	r4,#31		cmp	r2,#0x00010000	movcc	r2,r2,lsl#16	subcc	r4,r4,#16		cmp	r2,#0x01000000	movcc	r2,r2,lsl#8	subcc	r4,r4,#8		cmp	r2,#0x10000000	movcc	r2,r2,lsl#4	subcc	r4,r4,#4		cmp	r2,#0x40000000	movcc	r2,r2,lsl#2	subcc	r4,r4,#2		cmp	r2,#0x80000000	movcc	r2,r2,lsl#1	subcc	r4,r4,#1	stmia	r1,{r0,r2,r3,r4}	b	fastfpe_nextCPRT_flt_zero:	mov	r0,#0	mov	r4,#0x80000000	stmia	r1,{r0,r2,r3,r4}	b	fastfpe_next	/*---------------------------------------------------------------------------*/	.globl	CPRT_fixCPRT_fix:	ldmia	r2,{r1,r2,r3,r5}	bl	CPDO_rnd_core	CPRT_back:	add	r0,r13,r0,lsr#10	cmp	r5,#0	blt	CPRT_int_zero	cmp	r5,#30	bgt	CPRT_overflow		rsb	r5,r5,#31	mov	r2,r2,lsr r5	tst	r1,#0x80000000	rsbne	r2,r2,#0		str	r2,[r0]	b	fastfpe_nextCPRT_int_zero:	mov	r2,#0	str	r2,[r0]	b	fastfpe_nextCPRT_overflow:	mov	r2,#0x80000000	tst	r1,#0x80000000	subeq	r2,r2,#1	str	r2,[r0]	b	fastfpe_next/*---------------------------------------------------------------------------*/	.globl	CPRT_wfsCPRT_wfs:	b	fastfpe_next/*---------------------------------------------------------------------------*/	.globl	CPRT_rfsCPRT_rfs:	add	r0,r13,r0,lsr#10	mov	r1,#0x02000000		@ Software Emulation, not Acorn FPE	str	r1,[r0]	b	fastfpe_next/*---------------------------------------------------------------------------*/	.globl	CPRT_cmfCPRT_cmf:	ldmia	r1,{r1,r3,r5,r7}	ldmia	r2,{r2,r4,r6,r8}CPRT_cmf_e:	ldr	r0,[r13,#16*4]		cmp	r7,#0x7fffffff	bic	r0,r0,#0xf0000000	cmpeq	r3,#0xffffffff	beq	CPRT_cmf_unordered	cmp	r8,#0x7fffffff	cmpeq	r4,#0xffffffff	beq	CPRT_cmf_unordered	cmp	r1,r2	beq	CPRT_cmf_equalsign	b	CPRT_cmf_signCPRT_cmf_equalsign:	cmp	r7,r8	beq	CPRT_cmf_equalexponent	bgt	CPRT_cmf_sign	b	CPRT_cmf_signb	CPRT_cmf_equalexponent:	cmp	r3,r4	cmpeq	r5,r6	beq	CPRT_cmf_equal	bhi	CPRT_cmf_sign	b	CPRT_cmf_signbCPRT_cmf_sign:	tst	r1,#0x80000000	orreq	r0,r0,#0x20000000	orrne	r0,r0,#0x80000000	str	r0,[r13,#16*4]	b	fastfpe_nextCPRT_cmf_signb:	tst	r1,#0x80000000	orrne	r0,r0,#0x20000000	orreq	r0,r0,#0x80000000	str	r0,[r13,#16*4] 	b	fastfpe_nextCPRT_cmf_equal:	orr	r0,r0,#0x60000000	str	r0,[r13,#16*4]	b	fastfpe_nextCPRT_cmf_unordered:	orr	r0,r0,#0x10000000        str     r0,[r13,#16*4]        b       fastfpe_next/*---------------------------------------------------------------------------*/	.globl	CPRT_cnfCPRT_cnf:	ldmia	r1,{r1,r3,r5,r7}	ldmia	r2,{r2,r4,r6,r8}	eor	r2,r2,#0x80000000	b	CPRT_cmf_e/*---------------------------------------------------------------------------*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -