x86 asm: move binary arithmetic instructions from x86-assembly-cheat except cmp

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-06-12 00:00:00 +00:00
parent 90925e7e06
commit 0028ff0ebd
12 changed files with 326 additions and 8 deletions

View File

@@ -0,0 +1,17 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-binary-arithmetic-instructions
*
* SIGFPE :-)
*
* Signal handlind discussed at:
* https://stackoverflow.com/questions/39431879/c-handle-signal-sigfpe-and-continue-execution/39431923#39431923
*/
#include <lkmc.h>
LKMC_PROLOGUE
/* rdx:rax / 0 */
mov $0, %rdx
mov $1, %rax
mov $0, %rbx
div %rbx
LKMC_EPILOGUE