Cross Reference: floatundixf.S
xref: /src/sys/external/bsd/compiler_rt/dist/lib/builtins/i386/floatundixf.S
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /src/sys/external/bsd/compiler_rt/dist/lib/builtins/i386/
11.1Sjoerg// This file is dual licensed under the MIT and the University of Illinois Open
21.1Sjoerg// Source Licenses. See LICENSE.TXT for details.
31.1Sjoerg
41.1Sjoerg#include "../assembly.h"
51.1Sjoerg
61.1Sjoerg// long double __floatundixf(du_int a);16
71.1Sjoerg
81.1Sjoerg#ifdef __i386__
91.1Sjoerg
101.1.1.4SjoergCONST_SECTION
111.1.1.3Sjoerg
121.1.1.3Sjoerg	.balign 16
131.1.1.3Sjoergtwop52:
141.1.1.3Sjoerg	.quad 0x4330000000000000
151.1.1.3Sjoerg
161.1.1.3Sjoerg	.balign 16
171.1Sjoergtwop84_plus_twop52_neg:
181.1.1.3Sjoerg	.quad 0xc530000000100000
191.1.1.3Sjoerg
201.1.1.3Sjoerg	.balign 16
211.1.1.3Sjoergtwop84:
221.1.1.3Sjoerg	.quad 0x4530000000000000
231.1Sjoerg
241.1Sjoerg#define REL_ADDR(_a)	(_a)-0b(%eax)
251.1Sjoerg
261.1Sjoerg.text
271.1.1.2Sjoerg.balign 4
281.1SjoergDEFINE_COMPILERRT_FUNCTION(__floatundixf)
291.1Sjoerg	calll	0f
301.1Sjoerg0:	popl	%eax
311.1Sjoerg	movss	8(%esp),			%xmm0	// hi 32 bits of input
321.1Sjoerg	movss	4(%esp),			%xmm1	// lo 32 bits of input
331.1Sjoerg	orpd	REL_ADDR(twop84),	%xmm0	// 2^84 + hi (as a double)
341.1Sjoerg	orpd	REL_ADDR(twop52),	%xmm1	// 2^52 + lo (as a double)
351.1Sjoerg	addsd	REL_ADDR(twop84_plus_twop52_neg),	%xmm0	// hi - 2^52 (no rounding occurs)
361.1Sjoerg	movsd	%xmm1,				4(%esp)
371.1Sjoerg	fldl	4(%esp)
381.1Sjoerg	movsd	%xmm0,				4(%esp)
391.1Sjoerg	faddl	4(%esp)
401.1Sjoerg	ret
411.1SjoergEND_COMPILERRT_FUNCTION(__floatundixf)
421.1Sjoerg
431.1Sjoerg#endif // __i386__
44

Indexes created Thu Dec 11 15:09:36 GMT 2025