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

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

Issue 466033: Fast codegen: Working break and continue. (Closed)
Patch Set: Fixed bug in ARM PopTryHandler, merge with head. 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 157
158 void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) { 158 void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) {
159 LoadRoot(ip, Heap::kStackLimitRootIndex); 159 LoadRoot(ip, Heap::kStackLimitRootIndex);
160 cmp(sp, Operand(ip)); 160 cmp(sp, Operand(ip));
161 b(lo, on_stack_overflow); 161 b(lo, on_stack_overflow);
162 } 162 }
163 163
164 164
165 void MacroAssembler::Drop(int stack_elements, Condition cond) {
166 if (stack_elements > 0) {
167 add(sp, sp, Operand(stack_elements * kPointerSize), LeaveCC, cond);
168 }
169 }
170
171
172 void MacroAssembler::Call(Label* target) {
173 bl(target);
174 }
175
176
177 void MacroAssembler::Move(Register dst, Handle<Object> value) {
178 mov(dst, Operand(value));
179 }
165 180
166 181
167 void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) { 182 void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) {
168 // Empty the const pool. 183 // Empty the const pool.
169 CheckConstPool(true, true); 184 CheckConstPool(true, true);
170 add(pc, pc, Operand(index, 185 add(pc, pc, Operand(index,
171 LSL, 186 LSL,
172 assembler::arm::Instr::kInstrSizeLog2 - kSmiTagSize)); 187 assembler::arm::Instr::kInstrSizeLog2 - kSmiTagSize));
173 BlockConstPoolBefore(pc_offset() + (targets.length() + 1) * kInstrSize); 188 BlockConstPoolBefore(pc_offset() + (targets.length() + 1) * kInstrSize);
174 nop(); // Jump table alignment. 189 nop(); // Jump table alignment.
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 mov(r7, Operand(ExternalReference(Top::k_handler_address))); 636 mov(r7, Operand(ExternalReference(Top::k_handler_address)));
622 ldr(r6, MemOperand(r7)); 637 ldr(r6, MemOperand(r7));
623 ASSERT(StackHandlerConstants::kNextOffset == 0); 638 ASSERT(StackHandlerConstants::kNextOffset == 0);
624 push(r6); 639 push(r6);
625 // Link this handler as the new current one. 640 // Link this handler as the new current one.
626 str(sp, MemOperand(r7)); 641 str(sp, MemOperand(r7));
627 } 642 }
628 } 643 }
629 644
630 645
646 void MacroAssembler::PopTryHandler() {
647 ASSERT_EQ(0, StackHandlerConstants::kNextOffset);
648 pop(r1);
649 mov(ip, Operand(ExternalReference(Top::k_handler_address)));
650 add(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
651 str(r1, MemOperand(ip));
652 }
653
654
631 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg, 655 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
632 JSObject* holder, Register holder_reg, 656 JSObject* holder, Register holder_reg,
633 Register scratch, 657 Register scratch,
634 Label* miss) { 658 Label* miss) {
635 // Make sure there's no overlap between scratch and the other 659 // Make sure there's no overlap between scratch and the other
636 // registers. 660 // registers.
637 ASSERT(!scratch.is(object_reg) && !scratch.is(holder_reg)); 661 ASSERT(!scratch.is(object_reg) && !scratch.is(holder_reg));
638 662
639 // Keep track of the current object in register reg. 663 // Keep track of the current object in register reg.
640 Register reg = object_reg; 664 Register reg = object_reg;
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 } 1250 }
1227 1251
1228 1252
1229 void CodePatcher::Emit(Address addr) { 1253 void CodePatcher::Emit(Address addr) {
1230 masm()->emit(reinterpret_cast<Instr>(addr)); 1254 masm()->emit(reinterpret_cast<Instr>(addr));
1231 } 1255 }
1232 #endif // ENABLE_DEBUGGER_SUPPORT 1256 #endif // ENABLE_DEBUGGER_SUPPORT
1233 1257
1234 1258
1235 } } // namespace v8::internal 1259 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/compiler.cc » ('j') | src/fast-codegen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698