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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 7932010: MIPS: Fix assertion-fail on cacheflush from generated code. (Closed)
Patch Set: Created 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 stack_offset += kDoubleSize; 814 stack_offset += kDoubleSize;
815 } 815 }
816 } 816 }
817 addiu(sp, sp, stack_offset); 817 addiu(sp, sp, stack_offset);
818 } 818 }
819 819
820 820
821 void MacroAssembler::FlushICache(Register address, unsigned instructions) { 821 void MacroAssembler::FlushICache(Register address, unsigned instructions) {
822 RegList saved_regs = kJSCallerSaved | ra.bit(); 822 RegList saved_regs = kJSCallerSaved | ra.bit();
823 MultiPush(saved_regs); 823 MultiPush(saved_regs);
824 AllowExternalCallThatCantCauseGC scope(this);
824 825
825 // Save to a0 in case address == t0. 826 // Save to a0 in case address == t0.
826 Move(a0, address); 827 Move(a0, address);
827 PrepareCallCFunction(2, t0); 828 PrepareCallCFunction(2, t0);
828 829
829 li(a1, instructions * kInstrSize); 830 li(a1, instructions * kInstrSize);
830 CallCFunction(ExternalReference::flush_icache_function(isolate()), 2); 831 CallCFunction(ExternalReference::flush_icache_function(isolate()), 2);
831 MultiPop(saved_regs); 832 MultiPop(saved_regs);
832 } 833 }
833 834
(...skipping 3920 matching lines...) Expand 10 before | Expand all | Expand 10 after
4754 opcode == BGTZL); 4755 opcode == BGTZL);
4755 opcode = (cond == eq) ? BEQ : BNE; 4756 opcode = (cond == eq) ? BEQ : BNE;
4756 instr = (instr & ~kOpcodeMask) | opcode; 4757 instr = (instr & ~kOpcodeMask) | opcode;
4757 masm_.emit(instr); 4758 masm_.emit(instr);
4758 } 4759 }
4759 4760
4760 4761
4761 } } // namespace v8::internal 4762 } } // namespace v8::internal
4762 4763
4763 #endif // V8_TARGET_ARCH_MIPS 4764 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698