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

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

Issue 247533005: ARM64: Slightly improve MacroAssembler::Allocate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/arm64/macro-assembler-arm64.h ('k') | no next file » | 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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 FrameScope scope(this, StackFrame::NONE); 1530 FrameScope scope(this, StackFrame::NONE);
1531 CallRuntime(Runtime::kHiddenThrowMessage, 1); 1531 CallRuntime(Runtime::kHiddenThrowMessage, 1);
1532 } else { 1532 } else {
1533 CallRuntime(Runtime::kHiddenThrowMessage, 1); 1533 CallRuntime(Runtime::kHiddenThrowMessage, 1);
1534 } 1534 }
1535 // ThrowMessage should not return here. 1535 // ThrowMessage should not return here.
1536 Unreachable(); 1536 Unreachable();
1537 } 1537 }
1538 1538
1539 1539
1540 void MacroAssembler::ThrowIf(Condition cc, BailoutReason reason) { 1540 void MacroAssembler::ThrowIf(Condition cond, BailoutReason reason) {
1541 Label ok; 1541 Label ok;
1542 B(InvertCondition(cc), &ok); 1542 B(InvertCondition(cond), &ok);
1543 Throw(reason); 1543 Throw(reason);
1544 Bind(&ok); 1544 Bind(&ok);
1545 } 1545 }
1546 1546
1547 1547
1548 void MacroAssembler::ThrowIfSmi(const Register& value, BailoutReason reason) { 1548 void MacroAssembler::ThrowIfSmi(const Register& value, BailoutReason reason) {
1549 Label ok; 1549 Label ok;
1550 JumpIfNotSmi(value, &ok); 1550 JumpIfNotSmi(value, &ok);
1551 Throw(reason); 1551 Throw(reason);
1552 Bind(&ok); 1552 Bind(&ok);
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 // Load the allocation limit. 'result' already contains the allocation top. 3302 // Load the allocation limit. 'result' already contains the allocation top.
3303 Ldr(allocation_limit, MemOperand(top_address, limit - top)); 3303 Ldr(allocation_limit, MemOperand(top_address, limit - top));
3304 } 3304 }
3305 3305
3306 // We can ignore DOUBLE_ALIGNMENT flags here because doubles and pointers have 3306 // We can ignore DOUBLE_ALIGNMENT flags here because doubles and pointers have
3307 // the same alignment on ARM64. 3307 // the same alignment on ARM64.
3308 STATIC_ASSERT(kPointerAlignment == kDoubleAlignment); 3308 STATIC_ASSERT(kPointerAlignment == kDoubleAlignment);
3309 3309
3310 // Calculate new top and bail out if new space is exhausted. 3310 // Calculate new top and bail out if new space is exhausted.
3311 Adds(scratch3, result, object_size); 3311 Adds(scratch3, result, object_size);
3312 B(vs, gc_required); 3312 Ccmp(scratch3, allocation_limit, CFlag, cc);
3313 Cmp(scratch3, allocation_limit);
3314 B(hi, gc_required); 3313 B(hi, gc_required);
3315 Str(scratch3, MemOperand(top_address)); 3314 Str(scratch3, MemOperand(top_address));
3316 3315
3317 // Tag the object if requested. 3316 // Tag the object if requested.
3318 if ((flags & TAG_OBJECT) != 0) { 3317 if ((flags & TAG_OBJECT) != 0) {
3319 ObjectTag(result, result); 3318 ObjectTag(result, result);
3320 } 3319 }
3321 } 3320 }
3322 3321
3323 3322
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3384 Adds(scratch3, result, Operand(object_size, LSL, kPointerSizeLog2)); 3383 Adds(scratch3, result, Operand(object_size, LSL, kPointerSizeLog2));
3385 } else { 3384 } else {
3386 Adds(scratch3, result, object_size); 3385 Adds(scratch3, result, object_size);
3387 } 3386 }
3388 3387
3389 if (emit_debug_code()) { 3388 if (emit_debug_code()) {
3390 Tst(scratch3, kObjectAlignmentMask); 3389 Tst(scratch3, kObjectAlignmentMask);
3391 Check(eq, kUnalignedAllocationInNewSpace); 3390 Check(eq, kUnalignedAllocationInNewSpace);
3392 } 3391 }
3393 3392
3394 B(vs, gc_required); 3393 Ccmp(scratch3, allocation_limit, CFlag, cc);
3395 Cmp(scratch3, allocation_limit);
3396 B(hi, gc_required); 3394 B(hi, gc_required);
3397 Str(scratch3, MemOperand(top_address)); 3395 Str(scratch3, MemOperand(top_address));
3398 3396
3399 // Tag the object if requested. 3397 // Tag the object if requested.
3400 if ((flags & TAG_OBJECT) != 0) { 3398 if ((flags & TAG_OBJECT) != 0) {
3401 ObjectTag(result, result); 3399 ObjectTag(result, result);
3402 } 3400 }
3403 } 3401 }
3404 3402
3405 3403
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 } 5239 }
5242 } 5240 }
5243 5241
5244 5242
5245 #undef __ 5243 #undef __
5246 5244
5247 5245
5248 } } // namespace v8::internal 5246 } } // namespace v8::internal
5249 5247
5250 #endif // V8_TARGET_ARCH_ARM64 5248 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698