OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 | 1330 |
1331 | 1331 |
1332 void MacroAssembler::IllegalOperation(int num_arguments) { | 1332 void MacroAssembler::IllegalOperation(int num_arguments) { |
1333 if (num_arguments > 0) { | 1333 if (num_arguments > 0) { |
1334 add(sp, sp, Operand(num_arguments * kPointerSize)); | 1334 add(sp, sp, Operand(num_arguments * kPointerSize)); |
1335 } | 1335 } |
1336 LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 1336 LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
1337 } | 1337 } |
1338 | 1338 |
1339 | 1339 |
| 1340 void MacroAssembler::IndexFromHash(Register hash, Register index) { |
| 1341 // If the hash field contains an array index pick it out. The assert checks |
| 1342 // that the constants for the maximum number of digits for an array index |
| 1343 // cached in the hash field and the number of bits reserved for it does not |
| 1344 // conflict. |
| 1345 ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) < |
| 1346 (1 << String::kArrayIndexValueBits)); |
| 1347 // We want the smi-tagged index in key. kArrayIndexValueMask has zeros in |
| 1348 // the low kHashShift bits. |
| 1349 STATIC_ASSERT(kSmiTag == 0); |
| 1350 Ubfx(hash, hash, String::kHashShift, String::kArrayIndexValueBits); |
| 1351 mov(index, Operand(hash, LSL, kSmiTagSize)); |
| 1352 } |
| 1353 |
| 1354 |
1340 void MacroAssembler::IntegerToDoubleConversionWithVFP3(Register inReg, | 1355 void MacroAssembler::IntegerToDoubleConversionWithVFP3(Register inReg, |
1341 Register outHighReg, | 1356 Register outHighReg, |
1342 Register outLowReg) { | 1357 Register outLowReg) { |
1343 // ARMv7 VFP3 instructions to implement integer to double conversion. | 1358 // ARMv7 VFP3 instructions to implement integer to double conversion. |
1344 mov(r7, Operand(inReg, ASR, kSmiTagSize)); | 1359 mov(r7, Operand(inReg, ASR, kSmiTagSize)); |
1345 vmov(s15, r7); | 1360 vmov(s15, r7); |
1346 vcvt_f64_s32(d7, s15); | 1361 vcvt_f64_s32(d7, s15); |
1347 vmov(outLowReg, outHighReg, d7); | 1362 vmov(outLowReg, outHighReg, d7); |
1348 } | 1363 } |
1349 | 1364 |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 | 1942 |
1928 void CodePatcher::Emit(Address addr) { | 1943 void CodePatcher::Emit(Address addr) { |
1929 masm()->emit(reinterpret_cast<Instr>(addr)); | 1944 masm()->emit(reinterpret_cast<Instr>(addr)); |
1930 } | 1945 } |
1931 #endif // ENABLE_DEBUGGER_SUPPORT | 1946 #endif // ENABLE_DEBUGGER_SUPPORT |
1932 | 1947 |
1933 | 1948 |
1934 } } // namespace v8::internal | 1949 } } // namespace v8::internal |
1935 | 1950 |
1936 #endif // V8_TARGET_ARCH_ARM | 1951 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |