Fix synchronization between data and instr caches
This commit is contained in:
parent
6ed6a36a51
commit
c68af2db9d
1 changed files with 1 additions and 1 deletions
2
tccrun.c
2
tccrun.c
|
@ -225,7 +225,7 @@ static void set_pages_executable(void *ptr, unsigned long length)
|
||||||
end = (addr_t)ptr + length;
|
end = (addr_t)ptr + length;
|
||||||
end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);
|
end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);
|
||||||
mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);
|
mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);
|
||||||
__clear_cache(ptr, prog_main + length);
|
__clear_cache(ptr, ptr + length);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue