Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: src/a64/macro-assembler-a64.cc

Issue 146703008: A64: Add more descriptive messages to aborts (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/a64/regexp-macro-assembler-a64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 Register length, 2010 Register length,
2011 Register scratch, 2011 Register scratch,
2012 CopyHint hint) { 2012 CopyHint hint) {
2013 ASSERT(!AreAliased(src, dst, length, scratch)); 2013 ASSERT(!AreAliased(src, dst, length, scratch));
2014 2014
2015 // TODO(all): Implement a faster copy function, and use hint to determine 2015 // TODO(all): Implement a faster copy function, and use hint to determine
2016 // which algorithm to use for copies. 2016 // which algorithm to use for copies.
2017 if (emit_debug_code()) { 2017 if (emit_debug_code()) {
2018 // Check copy length. 2018 // Check copy length.
2019 Cmp(length, 0); 2019 Cmp(length, 0);
2020 // TODO(all): Add this error code to objects.h. 2020 Assert(ge, kUnexpectedNegativeValue);
2021 // Assert(ge, kCopyLengthIsBelowZero);
2022 Assert(ge, kUnknown);
2023 2021
2024 // Check src and dst buffers don't overlap. 2022 // Check src and dst buffers don't overlap.
2025 Add(scratch, src, length); // Calculate end of src buffer. 2023 Add(scratch, src, length); // Calculate end of src buffer.
2026 Cmp(scratch, dst); 2024 Cmp(scratch, dst);
2027 Add(scratch, dst, length); // Calculate end of dst buffer. 2025 Add(scratch, dst, length); // Calculate end of dst buffer.
2028 Ccmp(scratch, src, ZFlag, gt); 2026 Ccmp(scratch, src, ZFlag, gt);
2029 // TODO(all): Add this error code to objects.h. 2027 Assert(le, kCopyBuffersOverlap);
2030 // Assert(le, kCopyBytesSrcAndDstBuffersOverlap);
2031 Assert(le, kUnknown);
2032 } 2028 }
2033 2029
2034 Label loop, done; 2030 Label loop, done;
2035 Cbz(length, &done); 2031 Cbz(length, &done);
2036 2032
2037 Bind(&loop); 2033 Bind(&loop);
2038 Sub(length, length, 1); 2034 Sub(length, length, 1);
2039 Ldrb(scratch, MemOperand(src, 1, PostIndex)); 2035 Ldrb(scratch, MemOperand(src, 1, PostIndex));
2040 Strb(scratch, MemOperand(dst, 1, PostIndex)); 2036 Strb(scratch, MemOperand(dst, 1, PostIndex));
2041 Cbnz(length, &loop); 2037 Cbnz(length, &loop);
(...skipping 23 matching lines...) Expand all
2065 Label* failure, 2061 Label* failure,
2066 SmiCheckType smi_check) { 2062 SmiCheckType smi_check) {
2067 2063
2068 if (smi_check == DO_SMI_CHECK) { 2064 if (smi_check == DO_SMI_CHECK) {
2069 JumpIfEitherSmi(first, second, failure); 2065 JumpIfEitherSmi(first, second, failure);
2070 } else if (emit_debug_code()) { 2066 } else if (emit_debug_code()) {
2071 ASSERT(smi_check == DONT_DO_SMI_CHECK); 2067 ASSERT(smi_check == DONT_DO_SMI_CHECK);
2072 Label not_smi; 2068 Label not_smi;
2073 JumpIfEitherSmi(first, second, NULL, &not_smi); 2069 JumpIfEitherSmi(first, second, NULL, &not_smi);
2074 2070
2075 // TODO(all): Add this error code to objects.h. 2071 // At least one input is a smi, but the flags indicated a smi check wasn't
2076 // Abort(kAtLeastOneInputIsASmi); 2072 // needed.
2077 Abort(kUnknown); 2073 Abort(kUnexpectedSmi);
2078 2074
2079 Bind(&not_smi); 2075 Bind(&not_smi);
2080 } 2076 }
2081 2077
2082 // Test that both first and second are sequential ASCII strings. 2078 // Test that both first and second are sequential ASCII strings.
2083 Ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset)); 2079 Ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
2084 Ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset)); 2080 Ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
2085 Ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset)); 2081 Ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
2086 Ldrb(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset)); 2082 Ldrb(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
2087 2083
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 Cmp(exponent, HeapNumber::kExponentBias + HeapNumber::kMantissaBits + 32); 2427 Cmp(exponent, HeapNumber::kExponentBias + HeapNumber::kMantissaBits + 32);
2432 CzeroX(result, ge); 2428 CzeroX(result, ge);
2433 B(ge, &done); 2429 B(ge, &done);
2434 2430
2435 // The Fcvtzs sequence handles all cases except where the conversion causes 2431 // The Fcvtzs sequence handles all cases except where the conversion causes
2436 // signed overflow in the int64_t target. Since we've already handled 2432 // signed overflow in the int64_t target. Since we've already handled
2437 // exponents >= 84, we can guarantee that 63 <= exponent < 84. 2433 // exponents >= 84, we can guarantee that 63 <= exponent < 84.
2438 2434
2439 if (emit_debug_code()) { 2435 if (emit_debug_code()) {
2440 Cmp(exponent, HeapNumber::kExponentBias + 63); 2436 Cmp(exponent, HeapNumber::kExponentBias + 63);
2441 // TODO(all): Add this error code to objects.h. 2437 // Exponents less than this should have been handled by the Fcvt case.
2442 // Check(ge, kThisInputShouldHaveBeenHandledByTheFPU); 2438 Check(ge, kUnexpectedValue);
2443 Check(ge, kUnknown);
2444 } 2439 }
2445 2440
2446 // Isolate the mantissa bits, and set the implicit '1'. 2441 // Isolate the mantissa bits, and set the implicit '1'.
2447 Register mantissa = scratch2; 2442 Register mantissa = scratch2;
2448 Ubfx(mantissa, result, 0, HeapNumber::kMantissaBits); 2443 Ubfx(mantissa, result, 0, HeapNumber::kMantissaBits);
2449 Orr(mantissa, mantissa, 1UL << HeapNumber::kMantissaBits); 2444 Orr(mantissa, mantissa, 1UL << HeapNumber::kMantissaBits);
2450 2445
2451 // Negate the mantissa if necessary. 2446 // Negate the mantissa if necessary.
2452 Tst(result, kXSignMask); 2447 Tst(result, kXSignMask);
2453 Cneg(mantissa, mantissa, ne); 2448 Cneg(mantissa, mantissa, ne);
(...skipping 28 matching lines...) Expand all
2482 void MacroAssembler::HeapNumberECMA262ToInt32(Register result, 2477 void MacroAssembler::HeapNumberECMA262ToInt32(Register result,
2483 Register heap_number, 2478 Register heap_number,
2484 Register scratch1, 2479 Register scratch1,
2485 Register scratch2, 2480 Register scratch2,
2486 DoubleRegister double_scratch, 2481 DoubleRegister double_scratch,
2487 ECMA262ToInt32Result format) { 2482 ECMA262ToInt32Result format) {
2488 if (emit_debug_code()) { 2483 if (emit_debug_code()) {
2489 // Verify we indeed have a HeapNumber. 2484 // Verify we indeed have a HeapNumber.
2490 Label ok; 2485 Label ok;
2491 JumpIfHeapNumber(heap_number, &ok); 2486 JumpIfHeapNumber(heap_number, &ok);
2492 // TODO(all): Add this error code to objects.h. 2487 Abort(kExpectedHeapNumber);
2493 // Abort(kExpectedHeapNumber);
2494 Abort(kUnknown);
2495 Bind(&ok); 2488 Bind(&ok);
2496 } 2489 }
2497 2490
2498 Ldr(double_scratch, FieldMemOperand(heap_number, HeapNumber::kValueOffset)); 2491 Ldr(double_scratch, FieldMemOperand(heap_number, HeapNumber::kValueOffset));
2499 ECMA262ToInt32(result, double_scratch, scratch1, scratch2, format); 2492 ECMA262ToInt32(result, double_scratch, scratch1, scratch2, format);
2500 } 2493 }
2501 2494
2502 2495
2503 void MacroAssembler::EnterFrame(StackFrame::Type type) { 2496 void MacroAssembler::EnterFrame(StackFrame::Type type) {
2504 ASSERT(jssp.Is(StackPointer())); 2497 ASSERT(jssp.Is(StackPointer()));
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
2914 ExternalReference new_space_allocation_top = 2907 ExternalReference new_space_allocation_top =
2915 ExternalReference::new_space_allocation_top_address(isolate()); 2908 ExternalReference::new_space_allocation_top_address(isolate());
2916 2909
2917 // Make sure the object has no tag before resetting top. 2910 // Make sure the object has no tag before resetting top.
2918 Bic(object, object, kHeapObjectTagMask); 2911 Bic(object, object, kHeapObjectTagMask);
2919 #ifdef DEBUG 2912 #ifdef DEBUG
2920 // Check that the object un-allocated is below the current top. 2913 // Check that the object un-allocated is below the current top.
2921 Mov(scratch, Operand(new_space_allocation_top)); 2914 Mov(scratch, Operand(new_space_allocation_top));
2922 Ldr(scratch, MemOperand(scratch)); 2915 Ldr(scratch, MemOperand(scratch));
2923 Cmp(object, scratch); 2916 Cmp(object, scratch);
2924 // TODO(all): Add this error code to objects.h. 2917 Check(lt, kUndoAllocationOfNonAllocatedMemory);
2925 // Check(lt, kTryingToUndoAllocationOfNonAllocatedMemory);
2926 Check(lt, kUnknown);
2927 #endif 2918 #endif
2928 // Write the address of the object to un-allocate as the current top. 2919 // Write the address of the object to un-allocate as the current top.
2929 Mov(scratch, Operand(new_space_allocation_top)); 2920 Mov(scratch, Operand(new_space_allocation_top));
2930 Str(object, MemOperand(scratch)); 2921 Str(object, MemOperand(scratch));
2931 } 2922 }
2932 2923
2933 2924
2934 void MacroAssembler::AllocateTwoByteString(Register result, 2925 void MacroAssembler::AllocateTwoByteString(Register result,
2935 Register length, 2926 Register length,
2936 Register scratch1, 2927 Register scratch1,
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
3498 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; 3489 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
3499 Ldr(scratch, FieldMemOperand(scratch, offset)); 3490 Ldr(scratch, FieldMemOperand(scratch, offset));
3500 Ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); 3491 Ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
3501 3492
3502 // Check the context is a native context. 3493 // Check the context is a native context.
3503 if (emit_debug_code()) { 3494 if (emit_debug_code()) {
3504 // Read the first word and compare to the global_context_map. 3495 // Read the first word and compare to the global_context_map.
3505 Register temp = Tmp1(); 3496 Register temp = Tmp1();
3506 Ldr(temp, FieldMemOperand(scratch, HeapObject::kMapOffset)); 3497 Ldr(temp, FieldMemOperand(scratch, HeapObject::kMapOffset));
3507 CompareRoot(temp, Heap::kNativeContextMapRootIndex); 3498 CompareRoot(temp, Heap::kNativeContextMapRootIndex);
3508 // TODO(all): Add this error code to objects.h. 3499 Check(eq, kExpectedNativeContext);
3509 // Check(eq, kExpectedNativeContext);
3510 Check(eq, kUnknown);
3511 } 3500 }
3512 3501
3513 // Check if both contexts are the same. 3502 // Check if both contexts are the same.
3514 ldr(Tmp0(), FieldMemOperand(holder_reg, JSGlobalProxy::kNativeContextOffset)); 3503 ldr(Tmp0(), FieldMemOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
3515 cmp(scratch, Tmp0()); 3504 cmp(scratch, Tmp0());
3516 b(&same_contexts, eq); 3505 b(&same_contexts, eq);
3517 3506
3518 // Check the context is a native context. 3507 // Check the context is a native context.
3519 if (emit_debug_code()) { 3508 if (emit_debug_code()) {
3520 // Move Tmp0() into a different register, as CompareRoot will use it. 3509 // Move Tmp0() into a different register, as CompareRoot will use it.
3521 Register temp = Tmp1(); 3510 Register temp = Tmp1();
3522 mov(temp, Tmp0()); 3511 mov(temp, Tmp0());
3523 CompareRoot(temp, Heap::kNullValueRootIndex); 3512 CompareRoot(temp, Heap::kNullValueRootIndex);
3524 // TODO(all): Add this error code to objects.h. 3513 Check(ne, kExpectedNonNullContext);
3525 // Check(ne, kExpectedNonNullContext);
3526 Check(ne, kUnknown);
3527 3514
3528 Ldr(temp, FieldMemOperand(temp, HeapObject::kMapOffset)); 3515 Ldr(temp, FieldMemOperand(temp, HeapObject::kMapOffset));
3529 CompareRoot(temp, Heap::kNativeContextMapRootIndex); 3516 CompareRoot(temp, Heap::kNativeContextMapRootIndex);
3530 // TODO(all): Add this error code to objects.h. 3517 Check(eq, kExpectedNativeContext);
3531 // Check(eq, kExpectedNativeContext);
3532 Check(eq, kUnknown);
3533 3518
3534 // Let's consider that Tmp0() has been cloberred by the MacroAssembler. 3519 // Let's consider that Tmp0() has been cloberred by the MacroAssembler.
3535 // We reload it with its value. 3520 // We reload it with its value.
3536 ldr(Tmp0(), FieldMemOperand(holder_reg, 3521 ldr(Tmp0(), FieldMemOperand(holder_reg,
3537 JSGlobalProxy::kNativeContextOffset)); 3522 JSGlobalProxy::kNativeContextOffset));
3538 } 3523 }
3539 3524
3540 // Check that the security token in the calling global object is 3525 // Check that the security token in the calling global object is
3541 // compatible with the security token in the receiving global 3526 // compatible with the security token in the receiving global
3542 // object. 3527 // object.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3650 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests. 3635 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
3651 Register address, 3636 Register address,
3652 Register scratch, 3637 Register scratch,
3653 SaveFPRegsMode fp_mode, 3638 SaveFPRegsMode fp_mode,
3654 RememberedSetFinalAction and_then) { 3639 RememberedSetFinalAction and_then) {
3655 ASSERT(!AreAliased(object, address, scratch)); 3640 ASSERT(!AreAliased(object, address, scratch));
3656 Label done, store_buffer_overflow; 3641 Label done, store_buffer_overflow;
3657 if (emit_debug_code()) { 3642 if (emit_debug_code()) {
3658 Label ok; 3643 Label ok;
3659 JumpIfNotInNewSpace(object, &ok); 3644 JumpIfNotInNewSpace(object, &ok);
3660 // TODO(all): Add this error code to objects.h. 3645 Abort(kRememberedSetPointerInNewSpace);
3661 // Abort(kRememberedSetPointerIsInNewSpace);
3662 Abort(kUnknown);
3663 bind(&ok); 3646 bind(&ok);
3664 } 3647 }
3665 // Load store buffer top. 3648 // Load store buffer top.
3666 Mov(Tmp0(), Operand(ExternalReference::store_buffer_top(isolate()))); 3649 Mov(Tmp0(), Operand(ExternalReference::store_buffer_top(isolate())));
3667 Ldr(scratch, MemOperand(Tmp0())); 3650 Ldr(scratch, MemOperand(Tmp0()));
3668 // Store pointer to buffer and increment buffer top. 3651 // Store pointer to buffer and increment buffer top.
3669 Str(address, MemOperand(scratch, kPointerSize, PostIndex)); 3652 Str(address, MemOperand(scratch, kPointerSize, PostIndex));
3670 // Write back new top of buffer. 3653 // Write back new top of buffer.
3671 Str(scratch, MemOperand(Tmp0())); 3654 Str(scratch, MemOperand(Tmp0()));
3672 // Call stub on end of buffer. 3655 // Call stub on end of buffer.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3784 3767
3785 // Although the object register is tagged, the offset is relative to the start 3768 // Although the object register is tagged, the offset is relative to the start
3786 // of the object, so offset must be a multiple of kPointerSize. 3769 // of the object, so offset must be a multiple of kPointerSize.
3787 ASSERT(IsAligned(offset, kPointerSize)); 3770 ASSERT(IsAligned(offset, kPointerSize));
3788 3771
3789 Add(scratch, object, offset - kHeapObjectTag); 3772 Add(scratch, object, offset - kHeapObjectTag);
3790 if (emit_debug_code()) { 3773 if (emit_debug_code()) {
3791 Label ok; 3774 Label ok;
3792 Tst(scratch, (1 << kPointerSizeLog2) - 1); 3775 Tst(scratch, (1 << kPointerSizeLog2) - 1);
3793 B(eq, &ok); 3776 B(eq, &ok);
3794 // TODO(all): Add this error code to objects.h. 3777 Abort(kUnalignedCellInWriteBarrier);
3795 // Abort(kUnalignedCellInWriteBarrier);
3796 Abort(kUnknown);
3797 Bind(&ok); 3778 Bind(&ok);
3798 } 3779 }
3799 3780
3800 RecordWrite(object, 3781 RecordWrite(object,
3801 scratch, 3782 scratch,
3802 value, 3783 value,
3803 lr_status, 3784 lr_status,
3804 save_fp, 3785 save_fp,
3805 remembered_set_action, 3786 remembered_set_action,
3806 OMIT_SMI_CHECK, 3787 OMIT_SMI_CHECK,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
3892 3873
3893 void MacroAssembler::AssertHasValidColor(const Register& reg) { 3874 void MacroAssembler::AssertHasValidColor(const Register& reg) {
3894 if (emit_debug_code()) { 3875 if (emit_debug_code()) {
3895 // The bit sequence is backward. The first character in the string 3876 // The bit sequence is backward. The first character in the string
3896 // represents the least significant bit. 3877 // represents the least significant bit.
3897 ASSERT(strcmp(Marking::kImpossibleBitPattern, "01") == 0); 3878 ASSERT(strcmp(Marking::kImpossibleBitPattern, "01") == 0);
3898 3879
3899 Label color_is_valid; 3880 Label color_is_valid;
3900 Tbnz(reg, 0, &color_is_valid); 3881 Tbnz(reg, 0, &color_is_valid);
3901 Tbz(reg, 1, &color_is_valid); 3882 Tbz(reg, 1, &color_is_valid);
3902 // TODO(all): Add this error code to objects.h. 3883 Abort(kUnexpectedColorFound);
3903 // Abort(kImpossibleColorBitPatternFound);
3904 Abort(kUnknown);
3905 Bind(&color_is_valid); 3884 Bind(&color_is_valid);
3906 } 3885 }
3907 } 3886 }
3908 3887
3909 3888
3910 void MacroAssembler::GetMarkBits(Register addr_reg, 3889 void MacroAssembler::GetMarkBits(Register addr_reg,
3911 Register bitmap_reg, 3890 Register bitmap_reg,
3912 Register shift_reg) { 3891 Register shift_reg) {
3913 ASSERT(!AreAliased(addr_reg, bitmap_reg, shift_reg, no_reg)); 3892 ASSERT(!AreAliased(addr_reg, bitmap_reg, shift_reg, no_reg));
3914 // addr_reg is divided into fields: 3893 // addr_reg is divided into fields:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
3991 3970
3992 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, 3971 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location,
3993 Register result) { 3972 Register result) {
3994 ASSERT(!result.Is(ldr_location)); 3973 ASSERT(!result.Is(ldr_location));
3995 const uint32_t kLdrLitOffset_lsb = 5; 3974 const uint32_t kLdrLitOffset_lsb = 5;
3996 const uint32_t kLdrLitOffset_width = 19; 3975 const uint32_t kLdrLitOffset_width = 19;
3997 Ldr(result, MemOperand(ldr_location)); 3976 Ldr(result, MemOperand(ldr_location));
3998 if (emit_debug_code()) { 3977 if (emit_debug_code()) {
3999 And(result, result, LoadLiteralFMask); 3978 And(result, result, LoadLiteralFMask);
4000 Cmp(result, LoadLiteralFixed); 3979 Cmp(result, LoadLiteralFixed);
4001 // TODO(all): Add this error code to objects.h. 3980 Check(eq, kTheInstructionToPatchShouldBeAnLdrLiteral);
4002 // Check(eq, kTheInstructionToPatchShouldBeALoadLiteral);
4003 Check(eq, kUnknown);
4004 // The instruction was clobbered. Reload it. 3981 // The instruction was clobbered. Reload it.
4005 Ldr(result, MemOperand(ldr_location)); 3982 Ldr(result, MemOperand(ldr_location));
4006 } 3983 }
4007 Sbfx(result, result, kLdrLitOffset_lsb, kLdrLitOffset_width); 3984 Sbfx(result, result, kLdrLitOffset_lsb, kLdrLitOffset_width);
4008 Add(result, ldr_location, Operand(result, LSL, kWordSizeInBytesLog2)); 3985 Add(result, ldr_location, Operand(result, LSL, kWordSizeInBytesLog2));
4009 } 3986 }
4010 3987
4011 3988
4012 void MacroAssembler::EnsureNotWhite( 3989 void MacroAssembler::EnsureNotWhite(
4013 Register value, 3990 Register value,
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
4303 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, 4280 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
4304 Register map, 4281 Register map,
4305 Register scratch) { 4282 Register scratch) {
4306 // Load the initial map. The global functions all have initial maps. 4283 // Load the initial map. The global functions all have initial maps.
4307 Ldr(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 4284 Ldr(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
4308 if (emit_debug_code()) { 4285 if (emit_debug_code()) {
4309 Label ok, fail; 4286 Label ok, fail;
4310 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); 4287 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK);
4311 B(&ok); 4288 B(&ok);
4312 Bind(&fail); 4289 Bind(&fail);
4313 // TODO(all): Add this error code to objects.h. 4290 Abort(kGlobalFunctionsMustHaveInitialMap);
4314 // Abort(kGlobalFunctionMustHaveInitialMap);
4315 Abort(kUnknown);
4316 Bind(&ok); 4291 Bind(&ok);
4317 } 4292 }
4318 } 4293 }
4319 4294
4320 4295
4321 // This is the main Printf implementation. All other Printf variants call 4296 // This is the main Printf implementation. All other Printf variants call
4322 // PrintfNoPreserve after setting up one or more PreserveRegisterScopes. 4297 // PrintfNoPreserve after setting up one or more PreserveRegisterScopes.
4323 void MacroAssembler::PrintfNoPreserve(const char * format, 4298 void MacroAssembler::PrintfNoPreserve(const char * format,
4324 const CPURegister& arg0, 4299 const CPURegister& arg0,
4325 const CPURegister& arg1, 4300 const CPURegister& arg1,
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
4635 } 4610 }
4636 } 4611 }
4637 4612
4638 4613
4639 #undef __ 4614 #undef __
4640 4615
4641 4616
4642 } } // namespace v8::internal 4617 } } // namespace v8::internal
4643 4618
4644 #endif // V8_TARGET_ARCH_A64 4619 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/a64/regexp-macro-assembler-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698