Files
linux-kernel-module-cheat/userland/arch/aarch64/c/multiline.cpp
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

19 lines
346 B
C++

// https://stackoverflow.com/questions/3666013/how-to-write-multiline-inline-assembly-code-in-gcc-c/54575948#54575948
#include <assert.h>
#include <inttypes.h>
int main(void) {
uint64_t io = 0;
__asm__ (
R"(
add %[io], %[io], #1
add %[io], %[io], #1
)"
: [io] "+r" (io)
:
:
);
assert(io == 2);
}