OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 code->instr()->Mnemonic()); | 253 code->instr()->Mnemonic()); |
254 __ bind(code->entry()); | 254 __ bind(code->entry()); |
255 if (NeedsDeferredFrame()) { | 255 if (NeedsDeferredFrame()) { |
256 Comment(";;; Build frame"); | 256 Comment(";;; Build frame"); |
257 ASSERT(!frame_is_built_); | 257 ASSERT(!frame_is_built_); |
258 ASSERT(info()->IsStub()); | 258 ASSERT(info()->IsStub()); |
259 frame_is_built_ = true; | 259 frame_is_built_ = true; |
260 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); | 260 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); |
261 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); | 261 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); |
262 __ push(scratch0()); | 262 __ push(scratch0()); |
263 __ add(fp, sp, Operand(2 * kPointerSize)); | 263 __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
264 Comment(";;; Deferred code"); | 264 Comment(";;; Deferred code"); |
265 } | 265 } |
266 code->Generate(); | 266 code->Generate(); |
267 if (NeedsDeferredFrame()) { | 267 if (NeedsDeferredFrame()) { |
268 Comment(";;; Destroy frame"); | 268 Comment(";;; Destroy frame"); |
269 ASSERT(frame_is_built_); | 269 ASSERT(frame_is_built_); |
270 __ pop(ip); | 270 __ pop(ip); |
271 __ ldm(ia_w, sp, cp.bit() | fp.bit() | lr.bit()); | 271 __ ldm(ia_w, sp, cp.bit() | fp.bit() | lr.bit()); |
272 frame_is_built_ = false; | 272 frame_is_built_ = false; |
273 } | 273 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 __ b(&needs_frame); | 318 __ b(&needs_frame); |
319 } else { | 319 } else { |
320 __ bind(&needs_frame); | 320 __ bind(&needs_frame); |
321 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); | 321 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); |
322 // This variant of deopt can only be used with stubs. Since we don't | 322 // This variant of deopt can only be used with stubs. Since we don't |
323 // have a function pointer to install in the stack frame that we're | 323 // have a function pointer to install in the stack frame that we're |
324 // building, install a special marker there instead. | 324 // building, install a special marker there instead. |
325 ASSERT(info()->IsStub()); | 325 ASSERT(info()->IsStub()); |
326 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); | 326 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); |
327 __ push(scratch0()); | 327 __ push(scratch0()); |
328 __ add(fp, sp, Operand(2 * kPointerSize)); | 328 __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
329 __ mov(lr, Operand(pc), LeaveCC, al); | 329 __ mov(lr, Operand(pc), LeaveCC, al); |
330 __ mov(pc, ip); | 330 __ mov(pc, ip); |
331 } | 331 } |
332 } else { | 332 } else { |
333 __ mov(lr, Operand(pc), LeaveCC, al); | 333 __ mov(lr, Operand(pc), LeaveCC, al); |
334 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry))); | 334 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry))); |
335 } | 335 } |
336 masm()->CheckConstPool(false, false); | 336 masm()->CheckConstPool(false, false); |
337 } | 337 } |
338 | 338 |
(...skipping 5598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5937 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5937 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5938 __ ldr(result, FieldMemOperand(scratch, | 5938 __ ldr(result, FieldMemOperand(scratch, |
5939 FixedArray::kHeaderSize - kPointerSize)); | 5939 FixedArray::kHeaderSize - kPointerSize)); |
5940 __ bind(&done); | 5940 __ bind(&done); |
5941 } | 5941 } |
5942 | 5942 |
5943 | 5943 |
5944 #undef __ | 5944 #undef __ |
5945 | 5945 |
5946 } } // namespace v8::internal | 5946 } } // namespace v8::internal |
OLD | NEW |