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

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

Issue 965823002: Contribution of PowerPC port (continuation of 422063005) - currency (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-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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // MacroAssembler implements a collection of frequently used macros. 95 // MacroAssembler implements a collection of frequently used macros.
96 class MacroAssembler : public Assembler { 96 class MacroAssembler : public Assembler {
97 public: 97 public:
98 // The isolate parameter can be NULL if the macro assembler should 98 // The isolate parameter can be NULL if the macro assembler should
99 // not use isolate-dependent functionality. In this case, it's the 99 // not use isolate-dependent functionality. In this case, it's the
100 // responsibility of the caller to never invoke such function on the 100 // responsibility of the caller to never invoke such function on the
101 // macro assembler. 101 // macro assembler.
102 MacroAssembler(Isolate* isolate, void* buffer, int size); 102 MacroAssembler(Isolate* isolate, void* buffer, int size);
103 103
104 104
105 // Returns the size of a call in instructions. Note, the value returned is 105 // Returns the size of a call in instructions.
106 // only valid as long as no entries are added to the constant pool between
107 // checking the call size and emitting the actual call.
108 static int CallSize(Register target); 106 static int CallSize(Register target);
109 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); 107 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al);
110 static int CallSizeNotPredictableCodeSize(Address target, 108 static int CallSizeNotPredictableCodeSize(Address target,
111 RelocInfo::Mode rmode, 109 RelocInfo::Mode rmode,
112 Condition cond = al); 110 Condition cond = al);
113 111
114 // Jump, Call, and Ret pseudo instructions implementing inter-working. 112 // Jump, Call, and Ret pseudo instructions implementing inter-working.
115 void Jump(Register target); 113 void Jump(Register target);
116 void JumpToJSEntry(Register target); 114 void JumpToJSEntry(Register target);
117 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al, 115 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al,
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 675
678 // Initialize fields with filler values. Fields starting at |start_offset| 676 // Initialize fields with filler values. Fields starting at |start_offset|
679 // not including end_offset are overwritten with the value in |filler|. At 677 // not including end_offset are overwritten with the value in |filler|. At
680 // the end the loop, |start_offset| takes the value of |end_offset|. 678 // the end the loop, |start_offset| takes the value of |end_offset|.
681 void InitializeFieldsWithFiller(Register start_offset, Register end_offset, 679 void InitializeFieldsWithFiller(Register start_offset, Register end_offset,
682 Register filler); 680 Register filler);
683 681
684 // --------------------------------------------------------------------------- 682 // ---------------------------------------------------------------------------
685 // Support functions. 683 // Support functions.
686 684
685 // Machine code version of Map::GetConstructor().
686 // |temp| holds |result|'s map when done, and |temp2| its instance type.
687 void GetMapConstructor(Register result, Register map, Register temp,
688 Register temp2);
689
687 // Try to get function prototype of a function and puts the value in 690 // Try to get function prototype of a function and puts the value in
688 // the result register. Checks that the function really is a 691 // the result register. Checks that the function really is a
689 // function and jumps to the miss label if the fast checks fail. The 692 // function and jumps to the miss label if the fast checks fail. The
690 // function register will be untouched; the other registers may be 693 // function register will be untouched; the other registers may be
691 // clobbered. 694 // clobbered.
692 void TryGetFunctionPrototype(Register function, Register result, 695 void TryGetFunctionPrototype(Register function, Register result,
693 Register scratch, Label* miss, 696 Register scratch, Label* miss,
694 bool miss_on_bound_function = false); 697 bool miss_on_bound_function = false);
695 698
696 // Compare object type for heap object. heap_object contains a non-Smi 699 // Compare object type for heap object. heap_object contains a non-Smi
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 Label* failure); 1357 Label* failure);
1355 1358
1356 void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name); 1359 void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name);
1357 1360
1358 void EmitSeqStringSetCharCheck(Register string, Register index, 1361 void EmitSeqStringSetCharCheck(Register string, Register index,
1359 Register value, uint32_t encoding_mask); 1362 Register value, uint32_t encoding_mask);
1360 1363
1361 // --------------------------------------------------------------------------- 1364 // ---------------------------------------------------------------------------
1362 // Patching helpers. 1365 // Patching helpers.
1363 1366
1364 // Retrieve/patch the relocated value (lis/ori pair or constant pool load). 1367 // Retrieve/patch the relocated value (lis/ori pair).
1365 void GetRelocatedValue(Register location, Register result, Register scratch); 1368 void GetRelocatedValue(Register location, Register result, Register scratch);
1366 void SetRelocatedValue(Register location, Register scratch, 1369 void SetRelocatedValue(Register location, Register scratch,
1367 Register new_value); 1370 Register new_value);
1368 1371
1369 void ClampUint8(Register output_reg, Register input_reg); 1372 void ClampUint8(Register output_reg, Register input_reg);
1370 1373
1371 // Saturate a value into 8-bit unsigned integer 1374 // Saturate a value into 8-bit unsigned integer
1372 // if input_value < 0, output_value is 0 1375 // if input_value < 0, output_value is 0
1373 // if input_value > 255, output_value is 255 1376 // if input_value > 255, output_value is 255
1374 // otherwise output_value is the (int)input_value (round to nearest) 1377 // otherwise output_value is the (int)input_value (round to nearest)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 // Helper for finding the mark bits for an address. Afterwards, the 1481 // Helper for finding the mark bits for an address. Afterwards, the
1479 // bitmap register points at the word with the mark bits and the mask 1482 // bitmap register points at the word with the mark bits and the mask
1480 // the position of the first bit. Leaves addr_reg unchanged. 1483 // the position of the first bit. Leaves addr_reg unchanged.
1481 inline void GetMarkBits(Register addr_reg, Register bitmap_reg, 1484 inline void GetMarkBits(Register addr_reg, Register bitmap_reg,
1482 Register mask_reg); 1485 Register mask_reg);
1483 1486
1484 // Helper for throwing exceptions. Compute a handler address and jump to 1487 // Helper for throwing exceptions. Compute a handler address and jump to
1485 // it. See the implementation for register usage. 1488 // it. See the implementation for register usage.
1486 void JumpToHandlerEntry(); 1489 void JumpToHandlerEntry();
1487 1490
1491 static const RegList kSafepointSavedRegisters;
1492 static const int kNumSafepointSavedRegisters;
1493
1488 // Compute memory operands for safepoint stack slots. 1494 // Compute memory operands for safepoint stack slots.
1489 static int SafepointRegisterStackIndex(int reg_code); 1495 static int SafepointRegisterStackIndex(int reg_code);
1490 MemOperand SafepointRegisterSlot(Register reg); 1496 MemOperand SafepointRegisterSlot(Register reg);
1491 MemOperand SafepointRegistersAndDoublesSlot(Register reg); 1497 MemOperand SafepointRegistersAndDoublesSlot(Register reg);
1492 1498
1493 #if V8_OOL_CONSTANT_POOL
1494 // Loads the constant pool pointer (kConstantPoolRegister).
1495 enum CodeObjectAccessMethod { CAN_USE_IP, CONSTRUCT_INTERNAL_REFERENCE };
1496 void LoadConstantPoolPointerRegister(CodeObjectAccessMethod access_method,
1497 int ip_code_entry_delta = 0);
1498 #endif
1499
1500 bool generating_stub_; 1499 bool generating_stub_;
1501 bool has_frame_; 1500 bool has_frame_;
1502 // This handle will be patched with the code object on installation. 1501 // This handle will be patched with the code object on installation.
1503 Handle<Object> code_object_; 1502 Handle<Object> code_object_;
1504 1503
1505 // Needs access to SafepointRegisterStackIndex for compiled frame 1504 // Needs access to SafepointRegisterStackIndex for compiled frame
1506 // traversal. 1505 // traversal.
1507 friend class StandardFrame; 1506 friend class StandardFrame;
1508 }; 1507 };
1509 1508
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 #define ACCESS_MASM(masm) \ 1557 #define ACCESS_MASM(masm) \
1559 masm->stop(__FILE_LINE__); \ 1558 masm->stop(__FILE_LINE__); \
1560 masm-> 1559 masm->
1561 #else 1560 #else
1562 #define ACCESS_MASM(masm) masm-> 1561 #define ACCESS_MASM(masm) masm->
1563 #endif 1562 #endif
1564 } 1563 }
1565 } // namespace v8::internal 1564 } // namespace v8::internal
1566 1565
1567 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ 1566 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_
OLDNEW
« no previous file with comments | « src/ppc/lithium-ppc.cc ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698