x86 asm: sqrt x87

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-06-22 00:00:00 +00:00
parent 564735fbfc
commit f66e777337

View File

@@ -0,0 +1,15 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly */
#include <assert.h>
int main(void) {
double io = 4.0;
__asm__ (
"fsqrt"
: "+t" (io)
:
:
);
assert(io == 2.0);
return 0;
}