x86 asm: move x87 FPU instructions from x86-assembly-cheat

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-06-22 00:00:01 +00:00
parent f66e777337
commit 082901414a
12 changed files with 339 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-x87-fpu-instructions */
#include <lkmc.h>
.data
double_1_0: .double 1.0
double_minus_1_0: .double -1.0
LKMC_PROLOGUE
/* |-1| == 1 */
fldl double_minus_1_0
fabs
fldl double_1_0
fcomip %st(1)
LKMC_ASSERT(je)
finit
/* |1| == 1 */
fldl double_1_0
fabs
fldl double_1_0
fcomip %st(1)
LKMC_ASSERT(je)
finit
LKMC_EPILOGUE