-
-
Save vcoracolombo/f0d8b7c9f1cb63dac6ff0221209ec4ff 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(0x4010000000000000ULL); | |
TEST(0x4000000000000000ULL); | |
TEST(0x41c0000000000000ULL); | |
} | |
__builtin_mffs(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment