forked from bitblaze-fuzzball/fuzzball
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of various FP CPU features, especially on x64
For instance, basic support for single-precision SSE floats and x87 FP on x64. Some FPUCW improvements apply to 32-bit as well.
- Loading branch information
Showing
9 changed files
with
515 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
fp-assoc | ||
fp-round | ||
fp-ten | ||
fpucw-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <math.h> | ||
|
||
int main(int argc, char **argv) { | ||
float f; | ||
double d; | ||
long double ld; | ||
if (argc != 2) { | ||
fprintf(stderr, "Usage: fpucw-test <float>\n"); | ||
return 1; | ||
} | ||
f = strtof(argv[1], 0); | ||
d = strtod(argv[1], 0); | ||
ld = strtold(argv[1], 0); | ||
printf("32-bit %a: %snegative\n", f, (signbit(f) ? "" : "non-")); | ||
printf("64-bit %a: %snegative\n", d, (signbit(d) ? "" : "non-")); | ||
printf("80-bit %La: %snegative\n", ld, (signbit(ld) ? "" : "non-")); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.