Files
linux-kernel-module-cheat/userland/arch/x86_64/c/add.c
Ciro Santilli 六四事件 法轮功 0263c21557 userland: add assembly support
Move arm assembly cheat here, and start some work on x86 cheat as well.
2019-05-05 00:00:00 +00:00

17 lines
318 B
C

#include <assert.h>
#include <inttypes.h>
int main(void) {
uint64_t in1 = 0xFFFFFFFF;
uint64_t in2 = 0x1;
uint64_t out;
__asm__ (
"lea (%[in1], %[in2]), %[out];"
: [out] "=r" (out)
: [in1] "r" (in1),
[in2] "r" (in2)
:
);
assert(out == 0x100000000);
}