瀏覽代碼

asm for lrint family on i386

Rich Felker 13 年之前
父節點
當前提交
37eb14dd2b
共有 6 個文件被更改,包括 46 次插入0 次删除
  1. 8 0
      src/math/i386/llrint.s
  2. 9 0
      src/math/i386/llrintf.s
  3. 8 0
      src/math/i386/llrintl.s
  4. 7 0
      src/math/i386/lrint.s
  5. 7 0
      src/math/i386/lrintf.s
  6. 7 0
      src/math/i386/lrintl.s

+ 8 - 0
src/math/i386/llrint.s

@@ -0,0 +1,8 @@
+.global llrint
+.type llrint,@function
+llrint:
+	fldl 4(%esp)
+	fistpl 4(%esp)
+	mov 4(%esp),%eax
+	mov 8(%esp),%edx
+	ret

+ 9 - 0
src/math/i386/llrintf.s

@@ -0,0 +1,9 @@
+.global llrintf
+.type llrintf,@function
+llrintf:
+	sub $8,%esp
+	flds 12(%esp)
+	fistpq (%esp)
+	pop %eax
+	pop %edx
+	ret

+ 8 - 0
src/math/i386/llrintl.s

@@ -0,0 +1,8 @@
+.global llrintl
+.type llrintl,@function
+llrintl:
+	fldt 4(%esp)
+	fistpl 4(%esp)
+	mov 4(%esp),%eax
+	mov 8(%esp),%edx
+	ret

+ 7 - 0
src/math/i386/lrint.s

@@ -0,0 +1,7 @@
+.global lrint
+.type lrint,@function
+lrint:
+	fldl 4(%esp)
+	fistpl 4(%esp)
+	mov 4(%esp),%eax
+	ret

+ 7 - 0
src/math/i386/lrintf.s

@@ -0,0 +1,7 @@
+.global lrintf
+.type lrintf,@function
+lrintf:
+	flds 4(%esp)
+	fistpl 4(%esp)
+	mov 4(%esp),%eax
+	ret

+ 7 - 0
src/math/i386/lrintl.s

@@ -0,0 +1,7 @@
+.global lrintl
+.type lrintl,@function
+lrintl:
+	fldt 4(%esp)
+	fistpl 4(%esp)
+	mov 4(%esp),%eax
+	ret