| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 11 matching lines...) Expand all Loading... |
| 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| 29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| 30 | 30 |
| 31 #include "assembler.h" | 31 #include "assembler.h" |
| 32 #include "v8globals.h" |
| 32 | 33 |
| 33 namespace v8 { | 34 namespace v8 { |
| 34 namespace internal { | 35 namespace internal { |
| 35 | 36 |
| 36 // ---------------------------------------------------------------------------- | 37 // ---------------------------------------------------------------------------- |
| 37 // Static helper functions | 38 // Static helper functions |
| 38 | 39 |
| 39 // Generate a MemOperand for loading a field from an object. | 40 // Generate a MemOperand for loading a field from an object. |
| 40 static inline MemOperand FieldMemOperand(Register object, int offset) { | 41 static inline MemOperand FieldMemOperand(Register object, int offset) { |
| 41 return MemOperand(object, offset - kHeapObjectTag); | 42 return MemOperand(object, offset - kHeapObjectTag); |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 569 |
| 569 | 570 |
| 570 // Check if the map of an object is equal to a specified map (either | 571 // Check if the map of an object is equal to a specified map (either |
| 571 // given directly or as an index into the root list) and branch to | 572 // given directly or as an index into the root list) and branch to |
| 572 // label if not. Skip the smi check if not required (object is known | 573 // label if not. Skip the smi check if not required (object is known |
| 573 // to be a heap object) | 574 // to be a heap object) |
| 574 void CheckMap(Register obj, | 575 void CheckMap(Register obj, |
| 575 Register scratch, | 576 Register scratch, |
| 576 Handle<Map> map, | 577 Handle<Map> map, |
| 577 Label* fail, | 578 Label* fail, |
| 578 bool is_heap_object); | 579 SmiCheckType smi_check_type); |
| 579 | 580 |
| 580 void CheckMap(Register obj, | 581 void CheckMap(Register obj, |
| 581 Register scratch, | 582 Register scratch, |
| 582 Heap::RootListIndex index, | 583 Heap::RootListIndex index, |
| 583 Label* fail, | 584 Label* fail, |
| 584 bool is_heap_object); | 585 SmiCheckType smi_check_type); |
| 585 | 586 |
| 586 | 587 |
| 587 // Compare the object in a register to a value from the root list. | 588 // Compare the object in a register to a value from the root list. |
| 588 // Uses the ip register as scratch. | 589 // Uses the ip register as scratch. |
| 589 void CompareRoot(Register obj, Heap::RootListIndex index); | 590 void CompareRoot(Register obj, Heap::RootListIndex index); |
| 590 | 591 |
| 591 | 592 |
| 592 // Load and check the instance type of an object for being a string. | 593 // Load and check the instance type of an object for being a string. |
| 593 // Loads the type into the second argument register. | 594 // Loads the type into the second argument register. |
| 594 // Returns a condition that will be enabled if the object was a string. | 595 // Returns a condition that will be enabled if the object was a string. |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 | 981 |
| 981 // --------------------------------------------------------------------------- | 982 // --------------------------------------------------------------------------- |
| 982 // Patching helpers. | 983 // Patching helpers. |
| 983 | 984 |
| 984 // Get the location of a relocated constant (its address in the constant pool) | 985 // Get the location of a relocated constant (its address in the constant pool) |
| 985 // from its load site. | 986 // from its load site. |
| 986 void GetRelocatedValueLocation(Register ldr_location, | 987 void GetRelocatedValueLocation(Register ldr_location, |
| 987 Register result); | 988 Register result); |
| 988 | 989 |
| 989 | 990 |
| 991 void ClampUint8(Register output_reg, Register input_reg); |
| 992 |
| 993 void ClampDoubleToUint8(Register result_reg, |
| 994 DoubleRegister input_reg, |
| 995 DoubleRegister temp_double_reg); |
| 996 |
| 997 |
| 990 private: | 998 private: |
| 991 void CallCFunctionHelper(Register function, | 999 void CallCFunctionHelper(Register function, |
| 992 ExternalReference function_reference, | 1000 ExternalReference function_reference, |
| 993 Register scratch, | 1001 Register scratch, |
| 994 int num_reg_arguments, | 1002 int num_reg_arguments, |
| 995 int num_double_arguments); | 1003 int num_double_arguments); |
| 996 | 1004 |
| 997 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); | 1005 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); |
| 998 int CallSize(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); | 1006 int CallSize(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); |
| 999 void Call(intptr_t target, | 1007 void Call(intptr_t target, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1095 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1088 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1096 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1089 #else | 1097 #else |
| 1090 #define ACCESS_MASM(masm) masm-> | 1098 #define ACCESS_MASM(masm) masm-> |
| 1091 #endif | 1099 #endif |
| 1092 | 1100 |
| 1093 | 1101 |
| 1094 } } // namespace v8::internal | 1102 } } // namespace v8::internal |
| 1095 | 1103 |
| 1096 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1104 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |