Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Written by J.T. Conklin <jtc@netbsd.org>.
  3.  * Public domain.
  4.  * Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.
  5.  *
  6.  * Removed header file dependency for use in libmingwex.a by
  7.  *   Danny Smith <dannysmith@users.sourceforge.net>
  8.  */
  9.  
  10.         .file   "nearbyintf.S"
  11.         .text
  12.         .align 4
  13. .globl _nearbyintf
  14.         .def    _nearbyintf;    .scl    2;      .type   32;     .endef
  15. _nearbyintf:
  16.         flds    4(%esp)
  17.         pushl   %eax
  18.         pushl   %ecx
  19.         fnstcw  (%esp)
  20.         movl    (%esp), %eax
  21.         orl     $0x20, %eax
  22.         movl    %eax, 4(%esp)
  23.         fldcw   4(%esp)
  24.         frndint
  25.         fclex
  26.         fldcw   (%esp)
  27.         popl    %ecx
  28.         popl    %eax
  29.         ret
  30.