mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-29 13:15:47 +00: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
041e44a2ed
commit
3ff39d8e27
@ -936,20 +936,6 @@ namespace nanojit
|
||||
// to execute junk
|
||||
# if defined(UNDER_CE)
|
||||
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)
|
||||
for (int i = 0; i < 2; i++) {
|
||||
Page *p = (i == 0) ? _nativePages : _nativeExitPages;
|
||||
@ -966,6 +952,22 @@ namespace nanojit
|
||||
# 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
|
||||
NanoJIT_PortAPI_FlushInstructionCache(_nIns, _startingIns);
|
||||
NanoJIT_PortAPI_FlushInstructionCache(_nExitIns, _endJit2Addr);
|
||||
|
Loading…
Reference in New Issue
Block a user