OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 SmiCheckType smi_check_type); | 870 SmiCheckType smi_check_type); |
871 | 871 |
872 | 872 |
873 // Compare the object in a register to a value from the root list. | 873 // Compare the object in a register to a value from the root list. |
874 // Uses the ip register as scratch. | 874 // Uses the ip register as scratch. |
875 void CompareRoot(Register obj, Heap::RootListIndex index); | 875 void CompareRoot(Register obj, Heap::RootListIndex index); |
876 | 876 |
877 | 877 |
878 // Load and check the instance type of an object for being a string. | 878 // Load and check the instance type of an object for being a string. |
879 // Loads the type into the second argument register. | 879 // Loads the type into the second argument register. |
880 // Returns a condition that will be enabled if the object was a string. | 880 // Returns a condition that will be enabled if the object was a string |
| 881 // and the passed-in condition passed. If the passed-in condition failed |
| 882 // then flags remain unchanged. |
881 Condition IsObjectStringType(Register obj, | 883 Condition IsObjectStringType(Register obj, |
882 Register type) { | 884 Register type, |
883 ldr(type, FieldMemOperand(obj, HeapObject::kMapOffset)); | 885 Condition cond = al) { |
884 ldrb(type, FieldMemOperand(type, Map::kInstanceTypeOffset)); | 886 ldr(type, FieldMemOperand(obj, HeapObject::kMapOffset), cond); |
885 tst(type, Operand(kIsNotStringMask)); | 887 ldrb(type, FieldMemOperand(type, Map::kInstanceTypeOffset), cond); |
| 888 tst(type, Operand(kIsNotStringMask), cond); |
886 ASSERT_EQ(0, kStringTag); | 889 ASSERT_EQ(0, kStringTag); |
887 return eq; | 890 return eq; |
888 } | 891 } |
889 | 892 |
890 | 893 |
891 // Generates code for reporting that an illegal operation has | 894 // Generates code for reporting that an illegal operation has |
892 // occurred. | 895 // occurred. |
893 void IllegalOperation(int num_arguments); | 896 void IllegalOperation(int num_arguments); |
894 | 897 |
895 // Picks out an array index from the hash field. | 898 // Picks out an array index from the hash field. |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 } | 1182 } |
1180 | 1183 |
1181 // Untag the source value into destination and jump if source is a smi. | 1184 // Untag the source value into destination and jump if source is a smi. |
1182 // Souce and destination can be the same register. | 1185 // Souce and destination can be the same register. |
1183 void UntagAndJumpIfSmi(Register dst, Register src, Label* smi_case); | 1186 void UntagAndJumpIfSmi(Register dst, Register src, Label* smi_case); |
1184 | 1187 |
1185 // Untag the source value into destination and jump if source is not a smi. | 1188 // Untag the source value into destination and jump if source is not a smi. |
1186 // Souce and destination can be the same register. | 1189 // Souce and destination can be the same register. |
1187 void UntagAndJumpIfNotSmi(Register dst, Register src, Label* non_smi_case); | 1190 void UntagAndJumpIfNotSmi(Register dst, Register src, Label* non_smi_case); |
1188 | 1191 |
1189 // Jump the register contains a smi. | 1192 // Jump if the register contains a smi. |
1190 inline void JumpIfSmi(Register value, Label* smi_label) { | 1193 inline void JumpIfSmi(Register value, Label* smi_label) { |
1191 tst(value, Operand(kSmiTagMask)); | 1194 tst(value, Operand(kSmiTagMask)); |
1192 b(eq, smi_label); | 1195 b(eq, smi_label); |
1193 } | 1196 } |
1194 // Jump if either of the registers contain a non-smi. | 1197 // Jump if either of the registers contain a non-smi. |
1195 inline void JumpIfNotSmi(Register value, Label* not_smi_label) { | 1198 inline void JumpIfNotSmi(Register value, Label* not_smi_label) { |
1196 tst(value, Operand(kSmiTagMask)); | 1199 tst(value, Operand(kSmiTagMask)); |
1197 b(ne, not_smi_label); | 1200 b(ne, not_smi_label); |
1198 } | 1201 } |
1199 // Jump if either of the registers contain a non-smi. | 1202 // Jump if either of the registers contain a non-smi. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1405 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1403 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1406 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1404 #else | 1407 #else |
1405 #define ACCESS_MASM(masm) masm-> | 1408 #define ACCESS_MASM(masm) masm-> |
1406 #endif | 1409 #endif |
1407 | 1410 |
1408 | 1411 |
1409 } } // namespace v8::internal | 1412 } } // namespace v8::internal |
1410 | 1413 |
1411 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1414 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |