Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/ppc/assembler-ppc-inl.h

Issue 1339673002: PPC: Make FlushICache part of Assembler(Base) and take Isolate as parameter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 691
692 instr1 &= ~kImm16Mask; 692 instr1 &= ~kImm16Mask;
693 instr1 |= itarget & kImm16Mask; 693 instr1 |= itarget & kImm16Mask;
694 itarget = itarget >> 16; 694 itarget = itarget >> 16;
695 695
696 *p = instr1; 696 *p = instr1;
697 *(p + 1) = instr2; 697 *(p + 1) = instr2;
698 *(p + 3) = instr4; 698 *(p + 3) = instr4;
699 *(p + 4) = instr5; 699 *(p + 4) = instr5;
700 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 700 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
701 CpuFeatures::FlushICache(p, 5 * kInstrSize); 701 Assembler::FlushICacheWithoutIsolate(p, 5 * kInstrSize);
702 } 702 }
703 #else 703 #else
704 uint32_t* p = reinterpret_cast<uint32_t*>(pc); 704 uint32_t* p = reinterpret_cast<uint32_t*>(pc);
705 uint32_t itarget = reinterpret_cast<uint32_t>(target); 705 uint32_t itarget = reinterpret_cast<uint32_t>(target);
706 int lo_word = itarget & kImm16Mask; 706 int lo_word = itarget & kImm16Mask;
707 int hi_word = itarget >> 16; 707 int hi_word = itarget >> 16;
708 instr1 &= ~kImm16Mask; 708 instr1 &= ~kImm16Mask;
709 instr1 |= hi_word; 709 instr1 |= hi_word;
710 instr2 &= ~kImm16Mask; 710 instr2 &= ~kImm16Mask;
711 instr2 |= lo_word; 711 instr2 |= lo_word;
712 712
713 *p = instr1; 713 *p = instr1;
714 *(p + 1) = instr2; 714 *(p + 1) = instr2;
715 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 715 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
716 CpuFeatures::FlushICache(p, 2 * kInstrSize); 716 Assembler::FlushICacheWithoutIsolate(p, 2 * kInstrSize);
717 } 717 }
718 #endif 718 #endif
719 return; 719 return;
720 } 720 }
721 UNREACHABLE(); 721 UNREACHABLE();
722 } 722 }
723 } 723 }
724 } // namespace v8::internal 724 } // namespace v8::internal
725 725
726 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_ 726 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698