Skip to content

Instantly share code, notes, and snippets.

@AustinDizzy
Created January 12, 2014 10:56
Show Gist options
  • Save AustinDizzy/590a827ff00c67eba84c to your computer and use it in GitHub Desktop.
Save AustinDizzy/590a827ff00c67eba84c to your computer and use it in GitHub Desktop.
#define SLJIT_CACHE_FLUSH(from, to) \
void jit_clear_cache(char* from, char *to)
{
const int syscall = 0xf0002;
__asm __volatile (
"mov r0, %0\n"
"mov r1, %1\n"
"mov r7, %2\n"
"mov r2, #0x0\n"
"svc 0x00000000\n"
:
: "r" (from), "r" (to), "r" (syscall)
: "r0", "r1", "r7"
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment