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

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

Issue 6664001: [Isolates] Merge (7083,7111] from bleeding_edge. (Closed)
Patch Set: Created 9 years, 9 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-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 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 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 mov(ebx, Immediate(ext)); 1422 mov(ebx, Immediate(ext));
1423 CEntryStub ces(1); 1423 CEntryStub ces(1);
1424 return TryTailCallStub(&ces); 1424 return TryTailCallStub(&ces);
1425 } 1425 }
1426 1426
1427 1427
1428 void MacroAssembler::InvokePrologue(const ParameterCount& expected, 1428 void MacroAssembler::InvokePrologue(const ParameterCount& expected,
1429 const ParameterCount& actual, 1429 const ParameterCount& actual,
1430 Handle<Code> code_constant, 1430 Handle<Code> code_constant,
1431 const Operand& code_operand, 1431 const Operand& code_operand,
1432 Label* done, 1432 NearLabel* done,
1433 InvokeFlag flag, 1433 InvokeFlag flag,
1434 PostCallGenerator* post_call_generator) { 1434 PostCallGenerator* post_call_generator) {
1435 bool definitely_matches = false; 1435 bool definitely_matches = false;
1436 Label invoke; 1436 Label invoke;
1437 if (expected.is_immediate()) { 1437 if (expected.is_immediate()) {
1438 ASSERT(actual.is_immediate()); 1438 ASSERT(actual.is_immediate());
1439 if (expected.immediate() == actual.immediate()) { 1439 if (expected.immediate() == actual.immediate()) {
1440 definitely_matches = true; 1440 definitely_matches = true;
1441 } else { 1441 } else {
1442 mov(eax, actual.immediate()); 1442 mov(eax, actual.immediate());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 bind(&invoke); 1491 bind(&invoke);
1492 } 1492 }
1493 } 1493 }
1494 1494
1495 1495
1496 void MacroAssembler::InvokeCode(const Operand& code, 1496 void MacroAssembler::InvokeCode(const Operand& code,
1497 const ParameterCount& expected, 1497 const ParameterCount& expected,
1498 const ParameterCount& actual, 1498 const ParameterCount& actual,
1499 InvokeFlag flag, 1499 InvokeFlag flag,
1500 PostCallGenerator* post_call_generator) { 1500 PostCallGenerator* post_call_generator) {
1501 Label done; 1501 NearLabel done;
1502 InvokePrologue(expected, actual, Handle<Code>::null(), code, 1502 InvokePrologue(expected, actual, Handle<Code>::null(), code,
1503 &done, flag, post_call_generator); 1503 &done, flag, post_call_generator);
1504 if (flag == CALL_FUNCTION) { 1504 if (flag == CALL_FUNCTION) {
1505 call(code); 1505 call(code);
1506 if (post_call_generator != NULL) post_call_generator->Generate(); 1506 if (post_call_generator != NULL) post_call_generator->Generate();
1507 } else { 1507 } else {
1508 ASSERT(flag == JUMP_FUNCTION); 1508 ASSERT(flag == JUMP_FUNCTION);
1509 jmp(code); 1509 jmp(code);
1510 } 1510 }
1511 bind(&done); 1511 bind(&done);
1512 } 1512 }
1513 1513
1514 1514
1515 void MacroAssembler::InvokeCode(Handle<Code> code, 1515 void MacroAssembler::InvokeCode(Handle<Code> code,
1516 const ParameterCount& expected, 1516 const ParameterCount& expected,
1517 const ParameterCount& actual, 1517 const ParameterCount& actual,
1518 RelocInfo::Mode rmode, 1518 RelocInfo::Mode rmode,
1519 InvokeFlag flag, 1519 InvokeFlag flag,
1520 PostCallGenerator* post_call_generator) { 1520 PostCallGenerator* post_call_generator) {
1521 Label done; 1521 NearLabel done;
1522 Operand dummy(eax); 1522 Operand dummy(eax);
1523 InvokePrologue(expected, actual, code, dummy, &done, 1523 InvokePrologue(expected, actual, code, dummy, &done,
1524 flag, post_call_generator); 1524 flag, post_call_generator);
1525 if (flag == CALL_FUNCTION) { 1525 if (flag == CALL_FUNCTION) {
1526 call(code, rmode); 1526 call(code, rmode);
1527 if (post_call_generator != NULL) post_call_generator->Generate(); 1527 if (post_call_generator != NULL) post_call_generator->Generate();
1528 } else { 1528 } else {
1529 ASSERT(flag == JUMP_FUNCTION); 1529 ASSERT(flag == JUMP_FUNCTION);
1530 jmp(code, rmode); 1530 jmp(code, rmode);
1531 } 1531 }
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 2036
2037 // Check that the code was patched as expected. 2037 // Check that the code was patched as expected.
2038 ASSERT(masm_.pc_ == address_ + size_); 2038 ASSERT(masm_.pc_ == address_ + size_);
2039 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2039 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2040 } 2040 }
2041 2041
2042 2042
2043 } } // namespace v8::internal 2043 } } // namespace v8::internal
2044 2044
2045 #endif // V8_TARGET_ARCH_IA32 2045 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698