| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 Register result1_; | 418 Register result1_; |
| 419 Register result2_; | 419 Register result2_; |
| 420 Register source_; | 420 Register source_; |
| 421 Register zeros_; | 421 Register zeros_; |
| 422 | 422 |
| 423 // Minor key encoding in 16 bits. | 423 // Minor key encoding in 16 bits. |
| 424 class ModeBits: public BitField<OverwriteMode, 0, 2> {}; | 424 class ModeBits: public BitField<OverwriteMode, 0, 2> {}; |
| 425 class OpBits: public BitField<Token::Value, 2, 14> {}; | 425 class OpBits: public BitField<Token::Value, 2, 14> {}; |
| 426 | 426 |
| 427 Major MajorKey() const { return ConvertToDouble; } | 427 Major MajorKey() const { return ConvertToDouble; } |
| 428 int MinorKey() const { | 428 uint32_t MinorKey() const { |
| 429 // Encode the parameters in a unique 16 bit value. | 429 // Encode the parameters in a unique 16 bit value. |
| 430 return result1_.code() + | 430 return result1_.code() + |
| 431 (result2_.code() << 4) + | 431 (result2_.code() << 4) + |
| 432 (source_.code() << 8) + | 432 (source_.code() << 8) + |
| 433 (zeros_.code() << 12); | 433 (zeros_.code() << 12); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void Generate(MacroAssembler* masm); | 436 void Generate(MacroAssembler* masm); |
| 437 }; | 437 }; |
| 438 | 438 |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 ProfileEntryHookStub::MaybeCallEntryHook(masm); | 1385 ProfileEntryHookStub::MaybeCallEntryHook(masm); |
| 1386 | 1386 |
| 1387 __ mov(r5, Operand(r1)); | 1387 __ mov(r5, Operand(r1)); |
| 1388 | 1388 |
| 1389 // Compute the argv pointer in a callee-saved register. | 1389 // Compute the argv pointer in a callee-saved register. |
| 1390 __ add(r1, sp, Operand(r0, LSL, kPointerSizeLog2)); | 1390 __ add(r1, sp, Operand(r0, LSL, kPointerSizeLog2)); |
| 1391 __ sub(r1, r1, Operand(kPointerSize)); | 1391 __ sub(r1, r1, Operand(kPointerSize)); |
| 1392 | 1392 |
| 1393 // Enter the exit frame that transitions from JavaScript to C++. | 1393 // Enter the exit frame that transitions from JavaScript to C++. |
| 1394 FrameScope scope(masm, StackFrame::MANUAL); | 1394 FrameScope scope(masm, StackFrame::MANUAL); |
| 1395 __ EnterExitFrame(save_doubles_); | 1395 __ EnterExitFrame(save_doubles()); |
| 1396 | 1396 |
| 1397 // Store a copy of argc in callee-saved registers for later. | 1397 // Store a copy of argc in callee-saved registers for later. |
| 1398 __ mov(r4, Operand(r0)); | 1398 __ mov(r4, Operand(r0)); |
| 1399 | 1399 |
| 1400 // r0, r4: number of arguments including receiver (C callee-saved) | 1400 // r0, r4: number of arguments including receiver (C callee-saved) |
| 1401 // r1: pointer to the first argument (C callee-saved) | 1401 // r1: pointer to the first argument (C callee-saved) |
| 1402 // r5: pointer to builtin function (C callee-saved) | 1402 // r5: pointer to builtin function (C callee-saved) |
| 1403 | 1403 |
| 1404 // Result returned in r0 or r0+r1 by default. | 1404 // Result returned in r0 or r0+r1 by default. |
| 1405 | 1405 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 __ b(eq, &okay); | 1469 __ b(eq, &okay); |
| 1470 __ stop("Unexpected pending exception"); | 1470 __ stop("Unexpected pending exception"); |
| 1471 __ bind(&okay); | 1471 __ bind(&okay); |
| 1472 } | 1472 } |
| 1473 | 1473 |
| 1474 // Exit C frame and return. | 1474 // Exit C frame and return. |
| 1475 // r0:r1: result | 1475 // r0:r1: result |
| 1476 // sp: stack pointer | 1476 // sp: stack pointer |
| 1477 // fp: frame pointer | 1477 // fp: frame pointer |
| 1478 // Callee-saved register r4 still holds argc. | 1478 // Callee-saved register r4 still holds argc. |
| 1479 __ LeaveExitFrame(save_doubles_, r4, true); | 1479 __ LeaveExitFrame(save_doubles(), r4, true); |
| 1480 __ mov(pc, lr); | 1480 __ mov(pc, lr); |
| 1481 | 1481 |
| 1482 // Handling of exception. | 1482 // Handling of exception. |
| 1483 __ bind(&exception_returned); | 1483 __ bind(&exception_returned); |
| 1484 | 1484 |
| 1485 // Retrieve the pending exception. | 1485 // Retrieve the pending exception. |
| 1486 __ mov(r2, Operand(pending_exception_address)); | 1486 __ mov(r2, Operand(pending_exception_address)); |
| 1487 __ ldr(r0, MemOperand(r2)); | 1487 __ ldr(r0, MemOperand(r2)); |
| 1488 | 1488 |
| 1489 // Clear the pending exception. | 1489 // Clear the pending exception. |
| (...skipping 3606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5096 MemOperand(fp, 6 * kPointerSize), | 5096 MemOperand(fp, 6 * kPointerSize), |
| 5097 NULL); | 5097 NULL); |
| 5098 } | 5098 } |
| 5099 | 5099 |
| 5100 | 5100 |
| 5101 #undef __ | 5101 #undef __ |
| 5102 | 5102 |
| 5103 } } // namespace v8::internal | 5103 } } // namespace v8::internal |
| 5104 | 5104 |
| 5105 #endif // V8_TARGET_ARCH_ARM | 5105 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |