kolibrios/programs/develop/ktcc/trunk/libc.obj/source/math/floor.s
turbocat b5b499b8c8 kolibri-libc:
Move to folder with tcc. Part 1

git-svn-id: svn://kolibrios.org@8793 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-06-10 14:37:44 +00:00

27 lines
326 B
ArmAsm

/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
.global floor;
floor:
pushl %ebp
movl %esp,%ebp
subl $8,%esp
fstcw -4(%ebp)
fwait
movw -4(%ebp),%ax
andw $0xf3ff,%ax
orw $0x0400,%ax
movw %ax,-2(%ebp)
fldcw -2(%ebp)
fldl 8(%ebp)
frndint
fldcw -4(%ebp)
movl %ebp,%esp
popl %ebp
ret