[pcre-dev] [Bug 1243] New: enabling JIT on jailbroken iOS de…

Página Principal
Apagar esta mensagem
Autor: YllierDev
Data:  
Para: pcre-dev
Tópicos Novos: [pcre-dev] [Bug 1243] enabling JIT on jailbroken iOS devices
Assunto: [pcre-dev] [Bug 1243] New: enabling JIT on jailbroken iOS devices
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1243
           Summary: enabling JIT on jailbroken iOS devices
           Product: PCRE
           Version: 8.30
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: ruediger.rill@???
                CC: pcre-dev@???



JIT compilation is possible on jailbroken iOS devices, however Apple removed
__clear_cache from libgcc (on the devices) so it's not possible to use that
function.

By using ARM assembler it is possible to flush the instruction cache. So I
suggest the adding this:

#define SLJIT_CACHE_FLUSH(from, to) \
void jailbroken_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"
                      );
}



Best

Yllier


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email