File: ftst.x

package info (click to toggle)
linux86 0.16.21-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,072 kB
  • sloc: ansic: 66,757; asm: 6,154; makefile: 1,374; sh: 703
file content (28 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
! bcc 386 floating point routines (version 2) -- Ftst, Ftstd, Ftstf
! authors: Timothy Murphy (tim@maths.tcd.ie), Bruce Evans

#include "fplib.h"

#if 0 /* bcc doesn't generate Ftst (but it might in future) */
	.globl	Ftst
#endif
	.align	ALIGNMENT
Ftst:
	cmp	dword PC_SIZE+D_HIGH[esp],#0	! need only test upper dword of x
	ret	#D_SIZE

! Compare double at address [ebx] with 0

	.globl	Ftstd
	.align	ALIGNMENT
Ftstd:
	cmp	dword D_HIGH[ebx],#0	! need only test upper dword of x
	ret

! Compare float at address [ebx] with 0

	.globl	Ftstf
	.align	ALIGNMENT
Ftstf:
	cmp	dword F_HIGH[ebx],#0
	ret