Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Vorbis
Commits
d5b84418
Commit
d5b84418
authored
Nov 06, 2000
by
Jack Moffitt
Browse files
win32 asm ftoi
jack. svn path=/trunk/vorbis/; revision=1001
parent
ebd6d5e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/os.h
View file @
d5b84418
...
...
@@ -14,7 +14,7 @@
********************************************************************
function: #ifdef jail to whip a few platforms into the UNIX ideal.
last mod: $Id: os.h,v 1.1
3
2000/11/06
11:55:44 msmith
Exp $
last mod: $Id: os.h,v 1.1
4
2000/11/06
20:36:07 jack
Exp $
********************************************************************/
...
...
@@ -97,20 +97,31 @@ static inline int vorbis_ftoi(double f){ /* yes, double! Otherwise,
#else
static
int
vorbis_ftoi
(
double
f
){
return
(
int
)(
f
+
.
5
);
}
typedef
int
vorbis_fpu_control
;
#ifdef _WIN32
static
__inline
int
vorbis_ftoi
(
double
f
){
int
i
;
__asm
{
fld
f
fistp
i
}
return
i
;
}
static
__inline
void
vorbis_fpu_setround
(
vorbis_fpu_control
*
fpu
){
}
static
__inline
void
vorbis_fpu_restore
(
vorbis_fpu_control
fpu
){
}
#else
static
int
vorbis_ftoi
(
double
f
){
return
(
int
)(
f
+
.
5
);
}
/* We don't have special code for this compiler/arch, so do it the slow way */
#define vorbis_fpu_setround(vorbis_fpu_control) {}
#define vorbis_fpu_restore(vorbis_fpu_control) {}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment