xref: /haiku/src/system/libroot/posix/musl/math/x86/hypot.s (revision f504f61099b010fbfa94b1cc63d2e9072c7f7185)
1.global hypot
2.type hypot,@function
3hypot:
4	mov 8(%esp),%eax
5	mov 16(%esp),%ecx
6	add %eax,%eax
7	add %ecx,%ecx
8	and %eax,%ecx
9	cmp $0xffe00000,%ecx
10	jae 2f
11	or 4(%esp),%eax
12	jnz 1f
13	fldl 12(%esp)
14	fabs
15	ret
161:	mov 16(%esp),%eax
17	add %eax,%eax
18	or 12(%esp),%eax
19	jnz 1f
20	fldl 4(%esp)
21	fabs
22	ret
231:	fldl 4(%esp)
24	fld %st(0)
25	fmulp
26	fldl 12(%esp)
27	fld %st(0)
28	fmulp
29	faddp
30	fsqrt
31	ret
322:	sub $0xffe00000,%eax
33	or 4(%esp),%eax
34	jnz 1f
35	fldl 4(%esp)
36	fabs
37	ret
381:	mov 16(%esp),%eax
39	add %eax,%eax
40	sub $0xffe00000,%eax
41	or 12(%esp),%eax
42	fldl 12(%esp)
43	jnz 1f
44	fabs
451:	ret
46