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

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

Issue 23474012: Merged r16224 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 years, 3 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 | « no previous file | src/ia32/macro-assembler-ia32.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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 ldr(ip, MemOperand(topaddr)); 1685 ldr(ip, MemOperand(topaddr));
1686 cmp(result, ip); 1686 cmp(result, ip);
1687 Check(eq, "Unexpected allocation top"); 1687 Check(eq, "Unexpected allocation top");
1688 } 1688 }
1689 // Load allocation limit into ip. Result already contains allocation top. 1689 // Load allocation limit into ip. Result already contains allocation top.
1690 ldr(ip, MemOperand(topaddr, limit - top)); 1690 ldr(ip, MemOperand(topaddr, limit - top));
1691 } 1691 }
1692 1692
1693 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1693 if ((flags & DOUBLE_ALIGNMENT) != 0) {
1694 // Align the next allocation. Storing the filler map without checking top is 1694 // Align the next allocation. Storing the filler map without checking top is
1695 // always safe because the limit of the heap is always aligned. 1695 // safe in new-space because the limit of the heap is aligned there.
1696 ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0); 1696 ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
1697 ASSERT(kPointerAlignment * 2 == kDoubleAlignment); 1697 ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
1698 and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC); 1698 and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC);
1699 Label aligned; 1699 Label aligned;
1700 b(eq, &aligned); 1700 b(eq, &aligned);
1701 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
1702 cmp(result, Operand(ip));
1703 b(hs, gc_required);
1704 }
1701 mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); 1705 mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
1702 str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex)); 1706 str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex));
1703 bind(&aligned); 1707 bind(&aligned);
1704 } 1708 }
1705 1709
1706 // Calculate new top and bail out if new space is exhausted. Use result 1710 // Calculate new top and bail out if new space is exhausted. Use result
1707 // to calculate the new top. 1711 // to calculate the new top.
1708 if (obj_size_operand.is_single_instruction(this)) { 1712 if (obj_size_operand.is_single_instruction(this)) {
1709 // We can add the size as an immediate 1713 // We can add the size as an immediate
1710 add(scratch2, result, obj_size_operand, SetCC); 1714 add(scratch2, result, obj_size_operand, SetCC);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 ldr(ip, MemOperand(topaddr)); 1787 ldr(ip, MemOperand(topaddr));
1784 cmp(result, ip); 1788 cmp(result, ip);
1785 Check(eq, "Unexpected allocation top"); 1789 Check(eq, "Unexpected allocation top");
1786 } 1790 }
1787 // Load allocation limit into ip. Result already contains allocation top. 1791 // Load allocation limit into ip. Result already contains allocation top.
1788 ldr(ip, MemOperand(topaddr, limit - top)); 1792 ldr(ip, MemOperand(topaddr, limit - top));
1789 } 1793 }
1790 1794
1791 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1795 if ((flags & DOUBLE_ALIGNMENT) != 0) {
1792 // Align the next allocation. Storing the filler map without checking top is 1796 // Align the next allocation. Storing the filler map without checking top is
1793 // always safe because the limit of the heap is always aligned. 1797 // safe in new-space because the limit of the heap is aligned there.
1794 ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0); 1798 ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
1795 ASSERT(kPointerAlignment * 2 == kDoubleAlignment); 1799 ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
1796 and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC); 1800 and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC);
1797 Label aligned; 1801 Label aligned;
1798 b(eq, &aligned); 1802 b(eq, &aligned);
1803 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
1804 cmp(result, Operand(ip));
1805 b(hs, gc_required);
1806 }
1799 mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); 1807 mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
1800 str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex)); 1808 str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex));
1801 bind(&aligned); 1809 bind(&aligned);
1802 } 1810 }
1803 1811
1804 // Calculate new top and bail out if new space is exhausted. Use result 1812 // Calculate new top and bail out if new space is exhausted. Use result
1805 // to calculate the new top. Object size may be in words so a shift is 1813 // to calculate the new top. Object size may be in words so a shift is
1806 // required to get the number of bytes. 1814 // required to get the number of bytes.
1807 if ((flags & SIZE_IN_WORDS) != 0) { 1815 if ((flags & SIZE_IN_WORDS) != 0) {
1808 add(scratch2, result, Operand(object_size, LSL, kPointerSizeLog2), SetCC); 1816 add(scratch2, result, Operand(object_size, LSL, kPointerSizeLog2), SetCC);
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
3816 void CodePatcher::EmitCondition(Condition cond) { 3824 void CodePatcher::EmitCondition(Condition cond) {
3817 Instr instr = Assembler::instr_at(masm_.pc_); 3825 Instr instr = Assembler::instr_at(masm_.pc_);
3818 instr = (instr & ~kCondMask) | cond; 3826 instr = (instr & ~kCondMask) | cond;
3819 masm_.emit(instr); 3827 masm_.emit(instr);
3820 } 3828 }
3821 3829
3822 3830
3823 } } // namespace v8::internal 3831 } } // namespace v8::internal
3824 3832
3825 #endif // V8_TARGET_ARCH_ARM 3833 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698