mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
18 lines
392 B
ArmAsm
18 lines
392 B
ArmAsm
/* https://cirosantilli.com/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
|