Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
1f42612f
Commit
1f42612f
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Remove win32 inline asm routines that break in latest msvc
parent
a5bc3f02
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llmath/llmath.h
+2
-32
2 additions, 32 deletions
indra/llmath/llmath.h
with
2 additions
and
32 deletions
indra/llmath/llmath.h
+
2
−
32
View file @
1f42612f
...
...
@@ -164,23 +164,7 @@ inline F64 llabs(const F64 a)
inline
S32
lltrunc
(
F32
f
)
{
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && (ADDRESS_SIZE == 32)
// Avoids changing the floating point control word.
// Add or subtract 0.5 - epsilon and then round
const
static
U32
zpfp
[]
=
{
0xBEFFFFFF
,
0x3EFFFFFF
};
S32
result
;
__asm
{
fld
f
mov
eax
,
f
shr
eax
,
29
and
eax
,
4
fadd
dword
ptr
[
zpfp
+
eax
]
fistp
result
}
return
result
;
#else
return
(
S32
)
f
;
#endif
return
(
S32
)
f
;
}
inline
S32
lltrunc
(
F64
f
)
...
...
@@ -190,21 +174,7 @@ inline S32 lltrunc( F64 f )
inline
S32
llfloor
(
F32
f
)
{
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && (ADDRESS_SIZE == 32)
// Avoids changing the floating point control word.
// Accurate (unlike Stereopsis version) for all values between S32_MIN and S32_MAX and slightly faster than Stereopsis version.
// Add -(0.5 - epsilon) and then round
const
U32
zpfp
=
0xBEFFFFFF
;
S32
result
;
__asm
{
fld
f
fadd
dword
ptr
[
zpfp
]
fistp
result
}
return
result
;
#else
return
(
S32
)
floor
(
f
);
#endif
return
(
S32
)
floor
(
f
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment