| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 // Handle external strings. | 472 // Handle external strings. |
| 473 __ Bind(&external_string); | 473 __ Bind(&external_string); |
| 474 if (FLAG_debug_code) { | 474 if (FLAG_debug_code) { |
| 475 // Assert that we do not have a cons or slice (indirect strings) here. | 475 // Assert that we do not have a cons or slice (indirect strings) here. |
| 476 // Sequential strings have already been ruled out. | 476 // Sequential strings have already been ruled out. |
| 477 __ Tst(result, kIsIndirectStringMask); | 477 __ Tst(result, kIsIndirectStringMask); |
| 478 __ Assert(eq, "external string expected, but not found"); | 478 __ Assert(eq, "external string expected, but not found"); |
| 479 } | 479 } |
| 480 // Rule out short external strings. | 480 // Rule out short external strings. |
| 481 STATIC_CHECK(kShortExternalStringTag != 0); | 481 STATIC_CHECK(kShortExternalStringTag != 0); |
| 482 __ TestAndBranchIfAnySet(result, kShortExternalStringMask, call_runtime); | 482 // TestAndBranchIfAnySet can emit Tbnz. Do not use it because call_runtime |
| 483 // can be bound far away in deferred code. |
| 484 __ Tst(result, kShortExternalStringMask); |
| 485 __ B(ne, call_runtime); |
| 483 __ Ldr(string, FieldMemOperand(string, ExternalString::kResourceDataOffset)); | 486 __ Ldr(string, FieldMemOperand(string, ExternalString::kResourceDataOffset)); |
| 484 | 487 |
| 485 Label ascii, done; | 488 Label ascii, done; |
| 486 __ Bind(&check_encoding); | 489 __ Bind(&check_encoding); |
| 487 STATIC_ASSERT(kTwoByteStringTag == 0); | 490 STATIC_ASSERT(kTwoByteStringTag == 0); |
| 488 __ TestAndBranchIfAnySet(result, kStringEncodingMask, &ascii); | 491 __ TestAndBranchIfAnySet(result, kStringEncodingMask, &ascii); |
| 489 // Two-byte string. | 492 // Two-byte string. |
| 490 __ Ldrh(result, MemOperand(string, index, LSL, 1)); | 493 __ Ldrh(result, MemOperand(string, index, LSL, 1)); |
| 491 __ B(&done); | 494 __ B(&done); |
| 492 __ Bind(&ascii); | 495 __ Bind(&ascii); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 __ Fmul(result, double_temp3, double_temp1); | 618 __ Fmul(result, double_temp3, double_temp1); |
| 616 | 619 |
| 617 __ Bind(&done); | 620 __ Bind(&done); |
| 618 } | 621 } |
| 619 | 622 |
| 620 #undef __ | 623 #undef __ |
| 621 | 624 |
| 622 } } // namespace v8::internal | 625 } } // namespace v8::internal |
| 623 | 626 |
| 624 #endif // V8_TARGET_ARCH_A64 | 627 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |