Skip to content

Instantly share code, notes, and snippets.

@AustinDizzy
Created January 12, 2014 10:56

Revisions

  1. AustinDizzy created this gist Jan 12, 2014.
    15 changes: 15 additions & 0 deletions gistfile1.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #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"
    );
    }