History

add Watcom versions of lrint and lrintf asm inlines

sezero committed 8 years ago

Commit d1054fb1 parent ed072221 file · +31 −0Browse files

Unified · Split

src/float_cast.h+31−0
@@ -63,6 +63,37 @@ · 62 unmodified lines
63 63
64 #include <math.h>64 #include <math.h>
65 65
66#elif (defined (__WATCOMC__) && defined(__386__))
67
68 #include <math.h>
69
70 #undef HAVE_LRINT_REPLACEMENT
71 #define HAVE_LRINT_REPLACEMENT 1
72
73 #undef lrint
74 #undef lrintf
75
76 #define lrint double2int
77 #define lrintf float2int
78
79extern __inline long double2int(double);
80#pragma aux double2int = \
81 "push eax" \
82 "fistp dword ptr [esp]" \
83 "pop eax" \
84 parm [8087] \
85 value [eax] \
86 modify exact [eax];
87
88extern __inline long float2int(float);
89#pragma aux float2int = \
90 "push eax" \
91 "fistp dword ptr [esp]" \
92 "pop eax" \
93 parm [8087] \
94 value [eax] \
95 modify exact [eax];
96
66#elif (defined (__CYGWIN__))97#elif (defined (__CYGWIN__))
67 98
68 #include <math.h>99 #include <math.h>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t