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

📄 mfloat.s

📁 操作系统SunOS 4.1.3版本的源码
💻 S
字号:
        .data|        .asciz  "@(#)Mfloat.s 1.1 92/07/30 Copyr 1986 Sun Micro"        .even        .text|       Copyright (c) 1986 by Sun Microsystems, Inc.#include "fpcrtdefs.h"#include "Mdefs.h"RTENTRY(Muns)	cmpl	twoto31,d0	bges	1f	fintrzs	d0,fp0 			| fp0 gets x.	fmovel	fp0,d0	bras	2f1:	fmoves	d0,fp0	fsubs	twoto31,fp0		| Subtract 2**31.	fintrzx	fp0,fp0 		| fp0 gets x.	fmovel	fp0,d0	bchg	#31,d0			| Add 2**31.2: 	RETtwoto31: .long 0x4f000000		| 2**31.RTENTRY(Mund)	moveml  d0/d1,sp@-	cmpl	#0x41e00000,d0	bges	1f        fintrzd sp@+,fp0	fmovel	fp0,d0	bras	2f1:	fmoved	sp@+,fp0	fsubs	twoto31,fp0		| Subtract 2**31.	fintrzx	fp0,fp0 		| fp0 gets x.	fmovel	fp0,d0	bchg	#31,d0			| Add 2**31.2: 	RETRTENTRY(Mdtos)	FMOVEDINC	fmoves	fp0,d0	RETRTENTRY(Mstod)	fmoves	d0,fp0	FMOVEDEC	RETRTENTRY(Mflts)	fmovel	d0,fp0	fmoves	fp0,d0	RETRTENTRY(Mrints)	fmoves	d0,fp0 			| fp0 gets x.	fmovel	fp0,d0	RETRTENTRY(Mints)	fintrzs	d0,fp0 			| fp0 gets x.	fmovel	fp0,d0	RETRTENTRY(Mnints)	fmoves	d0,fp0			| fp0 gets x.	movel	#0x3f000000,d1		| d1 gets 0.5	tstl	d0	bpls	1f			| Branch if x is negative	bset	#31,d1			| d1 gets -0.5 if x is -.1:		fadds	d1,fp0			| Add +-0.5.	fintrzx	fp0,fp0	fmovel	fp0,d0	RETRTENTRY(Msqrs)	fmoves	d0,fp0	fmulx	fp0,fp0	fmoves	fp0,d0	RETRTENTRY(Madds)	fmoves	d0,fp0	fadds	d1,fp0	fmoves	fp0,d0	RETRTENTRY(Msubs)	fmoves	d0,fp0	fsubs	d1,fp0	fmoves	fp0,d0	RETRTENTRY(Mmuls)	fmoves	d0,fp0	fmuls d1,fp0	fmoves	fp0,d0	RETRTENTRY(Mdivs)	fmoves	d0,fp0	fdivs d1,fp0	fmoves	fp0,d0	RETRTENTRY(Mscaleis)	fmoves	d0,fp0	fscalel d1,fp0	fmoves	fp0,d0	RETRTENTRY(Mfltd)	fmovel	d0,fp0	FMOVEDEC	RETRTENTRY(Mrintd)	FMOVEDINC	fmovel	fp0,d0	RETRTENTRY(Mintd)	moveml  d0/d1,sp@-        fintrzd sp@+,fp0	fmovel	fp0,d0	RETRTENTRY(Mnintd)	FMOVEDINC	movel	#0x3f000000,d1		| d1 gets 0.5	tstl	d0	bpls	1f			| Branch if x is negative	bset	#31,d1			| d1 gets -0.5 if x is -.1:		fadds	d1,fp0			| Add +-0.5.	fintrzx	fp0,fp0	fmovel	fp0,d0	RETRTENTRY(Msqrd)	FMOVEDIN	fmulx	fp0,fp0	FMOVEDOUT	RETRTENTRY(Maddd)	FMOVEDIN	faddd	a0@,fp0	FMOVEDOUT	RETRTENTRY(Msubd)	FMOVEDIN	fsubd	a0@,fp0	FMOVEDOUT	RETRTENTRY(Mmuld)	FMOVEDIN	fmuld	a0@,fp0	FMOVEDOUT	RETRTENTRY(Mdivd)	FMOVEDIN	fdivd	a0@,fp0	FMOVEDOUT	RETRTENTRY(Mscaleid)	FMOVEDIN	fscalel a0@,fp0	FMOVEDOUT	RETRTENTRY(Mmode)	movel	d0,d1	fmovel	fpcr,d0	fmovel	d1,fpcr	RETRTENTRY(Mstatus)	movel	d0,d1	fmovel	fpsr,d0	fmovel	d1,fpsr	RETRTENTRY(Mcmps)	fmoves	d0,fp0	fcmps	d1,fp0	fmovel	fpsr,d0	roll	#8,d0	andw	#0xf,d0	lsll	#1,d0	movew	pc@(comparetable:b,d0:W),cc	RETcomparetable:	.word	FGT,FUN,FGT,FUN	.word	FEQ,FUN,FEQ,FUN	.word	FLT,FUN,FLT,FUN	.word	FEQ,FUN,FEQ,FUNRTENTRY(Mcmpd)	FMOVEDINC	fcmpd	a0@,fp0	fmovel	fpsr,d0	roll	#8,d0	andw	#0xf,d0	lsll	#1,d0	movew	pc@(comparetable:b,d0:W),cc	RET

⌨️ 快捷键说明

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