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

Side by Side Diff: src/ppc/macro-assembler-ppc.h

Issue 994533004: Contribution of PowerPC port (continuation of 422063005) - uplevel (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « src/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_ 5 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_
6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_ 6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 const Register dst_hi, 370 const Register dst_hi,
371 #endif 371 #endif
372 const Register dst, const DoubleRegister double_dst, 372 const Register dst, const DoubleRegister double_dst,
373 FPRoundingMode rounding_mode = kRoundToZero); 373 FPRoundingMode rounding_mode = kRoundToZero);
374 374
375 // Generates function and stub prologue code. 375 // Generates function and stub prologue code.
376 void StubPrologue(int prologue_offset = 0); 376 void StubPrologue(int prologue_offset = 0);
377 void Prologue(bool code_pre_aging, int prologue_offset = 0); 377 void Prologue(bool code_pre_aging, int prologue_offset = 0);
378 378
379 // Enter exit frame. 379 // Enter exit frame.
380 // stack_space - extra stack space, used for alignment before call to C. 380 // stack_space - extra stack space, used for parameters before call to C.
381 void EnterExitFrame(bool save_doubles, int stack_space = 0); 381 // At least one slot (for the return address) should be provided.
382 void EnterExitFrame(bool save_doubles, int stack_space = 1);
382 383
383 // Leave the current exit frame. Expects the return value in r0. 384 // Leave the current exit frame. Expects the return value in r0.
384 // Expect the number of values, pushed prior to the exit frame, to 385 // Expect the number of values, pushed prior to the exit frame, to
385 // remove in a register (or no_reg, if there is nothing to remove). 386 // remove in a register (or no_reg, if there is nothing to remove).
386 void LeaveExitFrame(bool save_doubles, Register argument_count, 387 void LeaveExitFrame(bool save_doubles, Register argument_count,
387 bool restore_context, 388 bool restore_context,
388 bool argument_count_is_length = false); 389 bool argument_count_is_length = false);
389 390
390 // Get the actual activation frame alignment for target environment. 391 // Get the actual activation frame alignment for target environment.
391 static int ActivationFrameAlignment(); 392 static int ActivationFrameAlignment();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 Register scratch); 456 Register scratch);
456 void MovInt64ToDouble(DoubleRegister dst, 457 void MovInt64ToDouble(DoubleRegister dst,
457 #if !V8_TARGET_ARCH_PPC64 458 #if !V8_TARGET_ARCH_PPC64
458 Register src_hi, 459 Register src_hi,
459 #endif 460 #endif
460 Register src); 461 Register src);
461 #if V8_TARGET_ARCH_PPC64 462 #if V8_TARGET_ARCH_PPC64
462 void MovInt64ComponentsToDouble(DoubleRegister dst, Register src_hi, 463 void MovInt64ComponentsToDouble(DoubleRegister dst, Register src_hi,
463 Register src_lo, Register scratch); 464 Register src_lo, Register scratch);
464 #endif 465 #endif
466 void InsertDoubleLow(DoubleRegister dst, Register src, Register scratch);
467 void InsertDoubleHigh(DoubleRegister dst, Register src, Register scratch);
465 void MovDoubleLowToInt(Register dst, DoubleRegister src); 468 void MovDoubleLowToInt(Register dst, DoubleRegister src);
466 void MovDoubleHighToInt(Register dst, DoubleRegister src); 469 void MovDoubleHighToInt(Register dst, DoubleRegister src);
467 void MovDoubleToInt64( 470 void MovDoubleToInt64(
468 #if !V8_TARGET_ARCH_PPC64 471 #if !V8_TARGET_ARCH_PPC64
469 Register dst_hi, 472 Register dst_hi,
470 #endif 473 #endif
471 Register dst, DoubleRegister src); 474 Register dst, DoubleRegister src);
472 475
473 void Add(Register dst, Register src, intptr_t value, Register scratch); 476 void Add(Register dst, Register src, intptr_t value, Register scratch);
474 void Cmpi(Register src1, const Operand& src2, Register scratch, 477 void Cmpi(Register src1, const Operand& src2, Register scratch,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // --------------------------------------------------------------------------- 544 // ---------------------------------------------------------------------------
542 // Exception handling 545 // Exception handling
543 546
544 // Push a new try handler and link into try handler chain. 547 // Push a new try handler and link into try handler chain.
545 void PushTryHandler(StackHandler::Kind kind, int handler_index); 548 void PushTryHandler(StackHandler::Kind kind, int handler_index);
546 549
547 // Unlink the stack handler on top of the stack from the try handler chain. 550 // Unlink the stack handler on top of the stack from the try handler chain.
548 // Must preserve the result register. 551 // Must preserve the result register.
549 void PopTryHandler(); 552 void PopTryHandler();
550 553
551 // Passes thrown value to the handler of top of the try handler chain.
552 void Throw(Register value);
553
554 // Propagates an uncatchable exception to the top of the current JS stack's
555 // handler chain.
556 void ThrowUncatchable(Register value);
557
558 // --------------------------------------------------------------------------- 554 // ---------------------------------------------------------------------------
559 // Inline caching support 555 // Inline caching support
560 556
561 // Generate code for checking access rights - used for security checks 557 // Generate code for checking access rights - used for security checks
562 // on access to global objects across environments. The holder register 558 // on access to global objects across environments. The holder register
563 // is left untouched, whereas both scratch registers are clobbered. 559 // is left untouched, whereas both scratch registers are clobbered.
564 void CheckAccessGlobalProxy(Register holder_reg, Register scratch, 560 void CheckAccessGlobalProxy(Register holder_reg, Register scratch,
565 Label* miss); 561 Label* miss);
566 562
567 void GetNumberHash(Register t0, Register scratch); 563 void GetNumberHash(Register t0, Register scratch);
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 void InNewSpace(Register object, Register scratch, 1473 void InNewSpace(Register object, Register scratch,
1478 Condition cond, // eq for new space, ne otherwise. 1474 Condition cond, // eq for new space, ne otherwise.
1479 Label* branch); 1475 Label* branch);
1480 1476
1481 // Helper for finding the mark bits for an address. Afterwards, the 1477 // Helper for finding the mark bits for an address. Afterwards, the
1482 // bitmap register points at the word with the mark bits and the mask 1478 // bitmap register points at the word with the mark bits and the mask
1483 // the position of the first bit. Leaves addr_reg unchanged. 1479 // the position of the first bit. Leaves addr_reg unchanged.
1484 inline void GetMarkBits(Register addr_reg, Register bitmap_reg, 1480 inline void GetMarkBits(Register addr_reg, Register bitmap_reg,
1485 Register mask_reg); 1481 Register mask_reg);
1486 1482
1487 // Helper for throwing exceptions. Compute a handler address and jump to
1488 // it. See the implementation for register usage.
1489 void JumpToHandlerEntry();
1490
1491 static const RegList kSafepointSavedRegisters; 1483 static const RegList kSafepointSavedRegisters;
1492 static const int kNumSafepointSavedRegisters; 1484 static const int kNumSafepointSavedRegisters;
1493 1485
1494 // Compute memory operands for safepoint stack slots. 1486 // Compute memory operands for safepoint stack slots.
1495 static int SafepointRegisterStackIndex(int reg_code); 1487 static int SafepointRegisterStackIndex(int reg_code);
1496 MemOperand SafepointRegisterSlot(Register reg); 1488 MemOperand SafepointRegisterSlot(Register reg);
1497 MemOperand SafepointRegistersAndDoublesSlot(Register reg); 1489 MemOperand SafepointRegistersAndDoublesSlot(Register reg);
1498 1490
1499 bool generating_stub_; 1491 bool generating_stub_;
1500 bool has_frame_; 1492 bool has_frame_;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 #define ACCESS_MASM(masm) \ 1549 #define ACCESS_MASM(masm) \
1558 masm->stop(__FILE_LINE__); \ 1550 masm->stop(__FILE_LINE__); \
1559 masm-> 1551 masm->
1560 #else 1552 #else
1561 #define ACCESS_MASM(masm) masm-> 1553 #define ACCESS_MASM(masm) masm->
1562 #endif 1554 #endif
1563 } 1555 }
1564 } // namespace v8::internal 1556 } // namespace v8::internal
1565 1557
1566 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ 1558 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_
OLDNEW
« no previous file with comments | « src/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698