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

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

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.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 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 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 andl(scratch2, Immediate(kFlatAsciiStringMask)); 2301 andl(scratch2, Immediate(kFlatAsciiStringMask));
2302 // Interleave the bits to check both scratch1 and scratch2 in one test. 2302 // Interleave the bits to check both scratch1 and scratch2 in one test.
2303 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); 2303 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3));
2304 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); 2304 lea(scratch1, Operand(scratch1, scratch2, times_8, 0));
2305 cmpl(scratch1, 2305 cmpl(scratch1,
2306 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); 2306 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3)));
2307 j(not_equal, on_fail, near_jump); 2307 j(not_equal, on_fail, near_jump);
2308 } 2308 }
2309 2309
2310 2310
2311 template<class T>
2312 static void JumpIfNotUniqueNameHelper(MacroAssembler* masm,
2313 T operand_or_register,
2314 Label* not_unique_name,
2315 Label::Distance distance) {
2316 STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag);
2317 masm->cmpb(operand_or_register, Immediate(kInternalizedTag));
2318 masm->j(less, not_unique_name, distance);
2319 masm->cmpb(operand_or_register, Immediate(SYMBOL_TYPE));
2320 masm->j(greater, not_unique_name, distance);
2321 }
2322
2323
2324 void MacroAssembler::JumpIfNotUniqueName(Operand operand,
2325 Label* not_unique_name,
2326 Label::Distance distance) {
2327 JumpIfNotUniqueNameHelper<Operand>(this, operand, not_unique_name, distance);
2328 }
2329
2330
2331 void MacroAssembler::JumpIfNotUniqueName(Register reg,
2332 Label* not_unique_name,
2333 Label::Distance distance) {
2334 JumpIfNotUniqueNameHelper<Register>(this, reg, not_unique_name, distance);
2335 }
2336
2311 2337
2312 void MacroAssembler::Move(Register dst, Register src) { 2338 void MacroAssembler::Move(Register dst, Register src) {
2313 if (!dst.is(src)) { 2339 if (!dst.is(src)) {
2314 movq(dst, src); 2340 movq(dst, src);
2315 } 2341 }
2316 } 2342 }
2317 2343
2318 2344
2319 void MacroAssembler::Move(Register dst, Handle<Object> source) { 2345 void MacroAssembler::Move(Register dst, Handle<Object> source) {
2320 AllowDeferredHandleDereference smi_check; 2346 AllowDeferredHandleDereference smi_check;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); 2680 addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize));
2655 } 2681 }
2656 2682
2657 2683
2658 void MacroAssembler::JumpToHandlerEntry() { 2684 void MacroAssembler::JumpToHandlerEntry() {
2659 // Compute the handler entry address and jump to it. The handler table is 2685 // Compute the handler entry address and jump to it. The handler table is
2660 // a fixed array of (smi-tagged) code offsets. 2686 // a fixed array of (smi-tagged) code offsets.
2661 // rax = exception, rdi = code object, rdx = state. 2687 // rax = exception, rdi = code object, rdx = state.
2662 movq(rbx, FieldOperand(rdi, Code::kHandlerTableOffset)); 2688 movq(rbx, FieldOperand(rdi, Code::kHandlerTableOffset));
2663 shr(rdx, Immediate(StackHandler::kKindWidth)); 2689 shr(rdx, Immediate(StackHandler::kKindWidth));
2664 movq(rdx, FieldOperand(rbx, rdx, times_8, FixedArray::kHeaderSize)); 2690 movq(rdx,
2691 FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize));
2665 SmiToInteger64(rdx, rdx); 2692 SmiToInteger64(rdx, rdx);
2666 lea(rdi, FieldOperand(rdi, rdx, times_1, Code::kHeaderSize)); 2693 lea(rdi, FieldOperand(rdi, rdx, times_1, Code::kHeaderSize));
2667 jmp(rdi); 2694 jmp(rdi);
2668 } 2695 }
2669 2696
2670 2697
2671 void MacroAssembler::Throw(Register value) { 2698 void MacroAssembler::Throw(Register value) {
2672 // Adjust this code if not the case. 2699 // Adjust this code if not the case.
2673 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); 2700 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize);
2674 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); 2701 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
4700 j(greater, &no_info_available); 4727 j(greater, &no_info_available);
4701 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 4728 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
4702 Heap::kAllocationSiteInfoMapRootIndex); 4729 Heap::kAllocationSiteInfoMapRootIndex);
4703 bind(&no_info_available); 4730 bind(&no_info_available);
4704 } 4731 }
4705 4732
4706 4733
4707 } } // namespace v8::internal 4734 } } // namespace v8::internal
4708 4735
4709 #endif // V8_TARGET_ARCH_X64 4736 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698