| 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 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| 7 | 7 |
| 8 #include "src/arm/assembler-arm.h" | 8 #include "src/arm/assembler-arm.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 CAN_INLINE_TARGET_ADDRESS, | 86 CAN_INLINE_TARGET_ADDRESS, |
| 87 NEVER_INLINE_TARGET_ADDRESS | 87 NEVER_INLINE_TARGET_ADDRESS |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 // MacroAssembler implements a collection of frequently used macros. | 90 // MacroAssembler implements a collection of frequently used macros. |
| 91 class MacroAssembler: public Assembler { | 91 class MacroAssembler: public Assembler { |
| 92 public: | 92 public: |
| 93 MacroAssembler(Isolate* isolate, void* buffer, int size, | 93 MacroAssembler(Isolate* isolate, void* buffer, int size, |
| 94 CodeObjectRequired create_code_object); | 94 CodeObjectRequired create_code_object); |
| 95 | 95 |
| 96 int jit_cookie() const { return jit_cookie_; } |
| 97 |
| 98 Isolate* isolate() const { return isolate_; } |
| 96 | 99 |
| 97 // Returns the size of a call in instructions. Note, the value returned is | 100 // Returns the size of a call in instructions. Note, the value returned is |
| 98 // only valid as long as no entries are added to the constant pool between | 101 // only valid as long as no entries are added to the constant pool between |
| 99 // checking the call size and emitting the actual call. | 102 // checking the call size and emitting the actual call. |
| 100 static int CallSize(Register target, Condition cond = al); | 103 static int CallSize(Register target, Condition cond = al); |
| 101 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); | 104 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); |
| 102 int CallStubSize(CodeStub* stub, | 105 int CallStubSize(CodeStub* stub, |
| 103 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 106 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
| 104 Condition cond = al); | 107 Condition cond = al); |
| 105 | 108 |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 void FloatMaxHelper(T result, T left, T right, Label* out_of_line); | 1402 void FloatMaxHelper(T result, T left, T right, Label* out_of_line); |
| 1400 template <typename T> | 1403 template <typename T> |
| 1401 void FloatMinHelper(T result, T left, T right, Label* out_of_line); | 1404 void FloatMinHelper(T result, T left, T right, Label* out_of_line); |
| 1402 template <typename T> | 1405 template <typename T> |
| 1403 void FloatMaxOutOfLineHelper(T result, T left, T right); | 1406 void FloatMaxOutOfLineHelper(T result, T left, T right); |
| 1404 template <typename T> | 1407 template <typename T> |
| 1405 void FloatMinOutOfLineHelper(T result, T left, T right); | 1408 void FloatMinOutOfLineHelper(T result, T left, T right); |
| 1406 | 1409 |
| 1407 bool generating_stub_; | 1410 bool generating_stub_; |
| 1408 bool has_frame_; | 1411 bool has_frame_; |
| 1412 Isolate* isolate_; |
| 1409 // This handle will be patched with the code object on installation. | 1413 // This handle will be patched with the code object on installation. |
| 1410 Handle<Object> code_object_; | 1414 Handle<Object> code_object_; |
| 1415 int jit_cookie_; |
| 1411 | 1416 |
| 1412 // Needs access to SafepointRegisterStackIndex for compiled frame | 1417 // Needs access to SafepointRegisterStackIndex for compiled frame |
| 1413 // traversal. | 1418 // traversal. |
| 1414 friend class StandardFrame; | 1419 friend class StandardFrame; |
| 1415 }; | 1420 }; |
| 1416 | 1421 |
| 1417 | |
| 1418 // The code patcher is used to patch (typically) small parts of code e.g. for | 1422 // The code patcher is used to patch (typically) small parts of code e.g. for |
| 1419 // debugging and other types of instrumentation. When using the code patcher | 1423 // debugging and other types of instrumentation. When using the code patcher |
| 1420 // the exact number of bytes specified must be emitted. It is not legal to emit | 1424 // the exact number of bytes specified must be emitted. It is not legal to emit |
| 1421 // relocation information. If any of these constraints are violated it causes | 1425 // relocation information. If any of these constraints are violated it causes |
| 1422 // an assertion to fail. | 1426 // an assertion to fail. |
| 1423 class CodePatcher { | 1427 class CodePatcher { |
| 1424 public: | 1428 public: |
| 1425 enum FlushICache { | 1429 enum FlushICache { |
| 1426 FLUSH, | 1430 FLUSH, |
| 1427 DONT_FLUSH | 1431 DONT_FLUSH |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 inline MemOperand NativeContextMemOperand() { | 1467 inline MemOperand NativeContextMemOperand() { |
| 1464 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); | 1468 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); |
| 1465 } | 1469 } |
| 1466 | 1470 |
| 1467 #define ACCESS_MASM(masm) masm-> | 1471 #define ACCESS_MASM(masm) masm-> |
| 1468 | 1472 |
| 1469 } // namespace internal | 1473 } // namespace internal |
| 1470 } // namespace v8 | 1474 } // namespace v8 |
| 1471 | 1475 |
| 1472 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1476 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |