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

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

Issue 6880036: Merge revision 7664 (revert of 7644 and 7632) to trunk. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 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/x64/macro-assembler-x64.h ('k') | test/cctest/test-debug.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 movq(kScratchRegister, 418 movq(kScratchRegister,
419 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(p1 - p0))), 419 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(p1 - p0))),
420 RelocInfo::NONE); 420 RelocInfo::NONE);
421 push(kScratchRegister); 421 push(kScratchRegister);
422 CallRuntime(Runtime::kAbort, 2); 422 CallRuntime(Runtime::kAbort, 2);
423 // will not return here 423 // will not return here
424 int3(); 424 int3();
425 } 425 }
426 426
427 427
428 void MacroAssembler::CallStub(CodeStub* stub, unsigned ast_id) { 428 void MacroAssembler::CallStub(CodeStub* stub) {
429 ASSERT(allow_stub_calls()); // calls are not allowed in some stubs 429 ASSERT(allow_stub_calls()); // calls are not allowed in some stubs
430 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); 430 Call(stub->GetCode(), RelocInfo::CODE_TARGET);
431 } 431 }
432 432
433 433
434 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub) { 434 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub) {
435 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs. 435 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs.
436 MaybeObject* result = stub->TryGetCode(); 436 MaybeObject* result = stub->TryGetCode();
437 if (!result->IsFailure()) { 437 if (!result->IsFailure()) {
438 call(Handle<Code>(Code::cast(result->ToObjectUnchecked())), 438 call(Handle<Code>(Code::cast(result->ToObjectUnchecked())),
439 RelocInfo::CODE_TARGET); 439 RelocInfo::CODE_TARGET);
440 } 440 }
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 int end_position = pc_offset() + CallSize(destination, rmode); 1603 int end_position = pc_offset() + CallSize(destination, rmode);
1604 #endif 1604 #endif
1605 movq(kScratchRegister, destination, rmode); 1605 movq(kScratchRegister, destination, rmode);
1606 call(kScratchRegister); 1606 call(kScratchRegister);
1607 #ifdef DEBUG 1607 #ifdef DEBUG
1608 CHECK_EQ(pc_offset(), end_position); 1608 CHECK_EQ(pc_offset(), end_position);
1609 #endif 1609 #endif
1610 } 1610 }
1611 1611
1612 1612
1613 void MacroAssembler::Call(Handle<Code> code_object, 1613 void MacroAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) {
1614 RelocInfo::Mode rmode,
1615 unsigned ast_id) {
1616 #ifdef DEBUG 1614 #ifdef DEBUG
1617 int end_position = pc_offset() + CallSize(code_object); 1615 int end_position = pc_offset() + CallSize(code_object);
1618 #endif 1616 #endif
1619 ASSERT(RelocInfo::IsCodeTarget(rmode)); 1617 ASSERT(RelocInfo::IsCodeTarget(rmode));
1620 call(code_object, rmode, ast_id); 1618 call(code_object, rmode);
1621 #ifdef DEBUG 1619 #ifdef DEBUG
1622 CHECK_EQ(end_position, pc_offset()); 1620 CHECK_EQ(end_position, pc_offset());
1623 #endif 1621 #endif
1624 } 1622 }
1625 1623
1626 1624
1627 void MacroAssembler::Pushad() { 1625 void MacroAssembler::Pushad() {
1628 push(rax); 1626 push(rax);
1629 push(rcx); 1627 push(rcx);
1630 push(rdx); 1628 push(rdx);
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2912 CPU::FlushICache(address_, size_); 2910 CPU::FlushICache(address_, size_);
2913 2911
2914 // Check that the code was patched as expected. 2912 // Check that the code was patched as expected.
2915 ASSERT(masm_.pc_ == address_ + size_); 2913 ASSERT(masm_.pc_ == address_ + size_);
2916 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2914 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2917 } 2915 }
2918 2916
2919 } } // namespace v8::internal 2917 } } // namespace v8::internal
2920 2918
2921 #endif // V8_TARGET_ARCH_X64 2919 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698