mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 476042 - Integrate sparc nanojit intro tracemonkey. Put the flush instruction cache code to the correct place. r=gal
This commit is contained in:
parent
d8bfd089e8
commit
604e62a813
@ -936,20 +936,6 @@ namespace nanojit
|
|||||||
// to execute junk
|
// to execute junk
|
||||||
# if defined(UNDER_CE)
|
# if defined(UNDER_CE)
|
||||||
FlushInstructionCache(GetCurrentProcess(), NULL, NULL);
|
FlushInstructionCache(GetCurrentProcess(), NULL, NULL);
|
||||||
#elif defined AVMPLUS_SPARC
|
|
||||||
// Clear Instruction Cache
|
|
||||||
for (int i = 0; i < 2; i++) {
|
|
||||||
Page *p = (i == 0) ? _nativePages : _nativeExitPages;
|
|
||||||
|
|
||||||
Page *first = p;
|
|
||||||
while (p) {
|
|
||||||
if (!p->next || p->next != p+1) {
|
|
||||||
sync_instruction_memory((char *)first, NJ_PAGE_SIZE);
|
|
||||||
first = p->next;
|
|
||||||
}
|
|
||||||
p = p->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# elif defined(AVMPLUS_UNIX)
|
# elif defined(AVMPLUS_UNIX)
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
Page *p = (i == 0) ? _nativePages : _nativeExitPages;
|
Page *p = (i == 0) ? _nativePages : _nativeExitPages;
|
||||||
@ -966,6 +952,22 @@ namespace nanojit
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef AVMPLUS_SPARC
|
||||||
|
// Clear Instruction Cache
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
Page *p = (i == 0) ? _nativePages : _nativeExitPages;
|
||||||
|
|
||||||
|
Page *first = p;
|
||||||
|
while (p) {
|
||||||
|
if (!p->next || p->next != p+1) {
|
||||||
|
sync_instruction_memory((char *)first, NJ_PAGE_SIZE);
|
||||||
|
first = p->next;
|
||||||
|
}
|
||||||
|
p = p->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
# ifdef AVMPLUS_PORTING_API
|
# ifdef AVMPLUS_PORTING_API
|
||||||
NanoJIT_PortAPI_FlushInstructionCache(_nIns, _startingIns);
|
NanoJIT_PortAPI_FlushInstructionCache(_nIns, _startingIns);
|
||||||
NanoJIT_PortAPI_FlushInstructionCache(_nExitIns, _endJit2Addr);
|
NanoJIT_PortAPI_FlushInstructionCache(_nExitIns, _endJit2Addr);
|
||||||
|
Loading…
Reference in New Issue
Block a user