Remove the inline assembly optimized versins of bintime_*() functions,

they have no measurable effect and they don't belong in an MI header
even if they did.
This commit is contained in:
Poul-Henning Kamp 2002-02-07 21:57:28 +00:00
parent 2028c0cdb9
commit d627bedae5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90363

View file

@ -89,35 +89,17 @@ struct bintime {
static __inline void
bintime_addx(struct bintime *bt, u_int64_t x)
{
#ifdef __i386
__asm( "
addl %%eax,4(%%ecx)
adcl %%edx,8(%%ecx)
adcl $0,0(%%ecx)
" : : "A" (x), "c" (bt));
#else
u_int64_t u;
u = bt->frac;
bt->frac += x;
if (u > bt->frac)
bt->sec++;
#endif
}
static __inline void
bintime_add(struct bintime *bt, struct bintime *bt2)
{
#ifdef __i386
__asm( "
movl 4(%%edx),%%eax
addl %%eax,4(%%ecx)
movl 8(%%edx),%%eax
adcl %%eax,8(%%ecx)
movl 0(%%edx),%%eax
adcl %%eax,0(%%ecx)
" : : "c" (bt), "d" (bt2));
#else
u_int64_t u;
u = bt->frac;
@ -125,22 +107,11 @@ bintime_add(struct bintime *bt, struct bintime *bt2)
if (u > bt->frac)
bt->sec++;
bt->sec += bt2->sec;
#endif
}
static __inline void
bintime_sub(struct bintime *bt, struct bintime *bt2)
{
#ifdef __i386
__asm( "
movl 4(%%edx),%%eax
subl %%eax,4(%%ecx)
movl 8(%%edx),%%eax
sbbl %%eax,8(%%ecx)
movl 0(%%edx),%%eax
sbbl %%eax,0(%%ecx)
" : : "c" (bt), "d" (bt2));
#else
u_int64_t u;
u = bt->frac;
@ -148,7 +119,6 @@ bintime_sub(struct bintime *bt, struct bintime *bt2)
if (u < bt->frac)
bt->sec--;
bt->sec -= bt2->sec;
#endif
}
static __inline void