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

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

Issue 435020: Fast-compiler: Add stack limit checks to back edges of while, do-while and for. (Closed)
Patch Set: Created 11 years 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void MacroAssembler::Ret(Condition cond) { 149 void MacroAssembler::Ret(Condition cond) {
150 #if USE_BX 150 #if USE_BX
151 bx(lr, cond); 151 bx(lr, cond);
152 #else 152 #else
153 mov(pc, Operand(lr), LeaveCC, cond); 153 mov(pc, Operand(lr), LeaveCC, cond);
154 #endif 154 #endif
155 } 155 }
156 156
157 157
158 void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) {
159 LoadRoot(ip, Heap::kStackLimitRootIndex);
160 cmp(sp, Operand(ip));
161 b(lo, on_stack_overflow);
162 }
163
164
165
166
158 void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) { 167 void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) {
159 // Empty the const pool. 168 // Empty the const pool.
160 CheckConstPool(true, true); 169 CheckConstPool(true, true);
161 add(pc, pc, Operand(index, 170 add(pc, pc, Operand(index,
162 LSL, 171 LSL,
163 assembler::arm::Instr::kInstrSizeLog2 - kSmiTagSize)); 172 assembler::arm::Instr::kInstrSizeLog2 - kSmiTagSize));
164 BlockConstPoolBefore(pc_offset() + (targets.length() + 1) * kInstrSize); 173 BlockConstPoolBefore(pc_offset() + (targets.length() + 1) * kInstrSize);
165 nop(); // Jump table alignment. 174 nop(); // Jump table alignment.
166 for (int i = 0; i < targets.length(); i++) { 175 for (int i = 0; i < targets.length(); i++) {
167 b(targets[i]); 176 b(targets[i]);
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 } 1199 }
1191 1200
1192 1201
1193 void CodePatcher::Emit(Address addr) { 1202 void CodePatcher::Emit(Address addr) {
1194 masm()->emit(reinterpret_cast<Instr>(addr)); 1203 masm()->emit(reinterpret_cast<Instr>(addr));
1195 } 1204 }
1196 #endif // ENABLE_DEBUGGER_SUPPORT 1205 #endif // ENABLE_DEBUGGER_SUPPORT
1197 1206
1198 1207
1199 } } // namespace v8::internal 1208 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698