From 4cd6a4a5d7e49d54d53dcf4a6f3393d50bd88e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20Beauchesne?= Date: Wed, 4 Jun 2003 18:44:09 +0000 Subject: Import dietlibc 0.22 + other fixes for AMD64 --- mdk-stage1/dietlibc/i386/cos.S | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 mdk-stage1/dietlibc/i386/cos.S (limited to 'mdk-stage1/dietlibc/i386/cos.S') diff --git a/mdk-stage1/dietlibc/i386/cos.S b/mdk-stage1/dietlibc/i386/cos.S new file mode 100644 index 000000000..f95c81ca7 --- /dev/null +++ b/mdk-stage1/dietlibc/i386/cos.S @@ -0,0 +1,35 @@ +.text + +.global cosf,cos,cosl +.type cosf,@function +.type cos,@function +.type cosl,@function + +cosf: + flds 4(%esp) + jmp 1f +cos: + fldl 4(%esp) +1: + fcos + fnstsw %ax + testb $0x04, %ah + je 3f + fldpi + fadd %st + fxch %st(1) +2: fprem1 + fnstsw %ax + testb $0x04, %ah + jne 2b + fstp %st(1) + fcos +3: ret +cosl: + fldt 4(%esp) + jmp 1b + +.Lende: +.size cos,.Lende-cos +.size cosl,.Lende-cosl +.size cosf,.Lende-cosf -- cgit v1.2.1