-
-
Save vcoracolombo/4b592644517c0efb3854872a4b30f6cc to your computer and use it in GitHub Desktop.
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
#include <stdint.h> | |
#define TEST(H1) \ | |
do { \ | |
uint64_t frt; \ | |
asm("fsqrt %0, %1\n\tfmadd %0, %1, %0, %1" : "=f"(frt) : "f"(H1)); \ | |
} while (0) | |
int main(void) | |
{ | |
int i = 0; | |
__builtin_mtfsb1(46 - 32); __builtin_mtfsb1(38 - 32); __builtin_mtfsb1(32 - 32); | |
for (; i < 100000000; ++i) { | |
TEST(0xc00921f9f01b866eULL); | |
TEST(0xc0934a456d5cfaadULL); | |
TEST(0xbfdb26c7eae5bc88ULL); | |
} | |
__builtin_mffs(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment