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

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

Issue 153983002: MIPS: Fixes for patch sites if long branches are emitted. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/mips/macro-assembler-mips.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 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 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 } 1556 }
1557 1557
1558 1558
1559 void MacroAssembler::Branch(Label* L, Condition cond, Register rs, 1559 void MacroAssembler::Branch(Label* L, Condition cond, Register rs,
1560 const Operand& rt, 1560 const Operand& rt,
1561 BranchDelaySlot bdslot) { 1561 BranchDelaySlot bdslot) {
1562 if (L->is_bound()) { 1562 if (L->is_bound()) {
1563 if (is_near(L)) { 1563 if (is_near(L)) {
1564 BranchShort(L, cond, rs, rt, bdslot); 1564 BranchShort(L, cond, rs, rt, bdslot);
1565 } else { 1565 } else {
1566 Label skip; 1566 if (cond != cc_always) {
1567 Condition neg_cond = NegateCondition(cond); 1567 Label skip;
1568 BranchShort(&skip, neg_cond, rs, rt); 1568 Condition neg_cond = NegateCondition(cond);
1569 Jr(L, bdslot); 1569 BranchShort(&skip, neg_cond, rs, rt);
1570 bind(&skip); 1570 Jr(L, bdslot);
1571 bind(&skip);
1572 } else {
1573 Jr(L, bdslot);
1574 }
1571 } 1575 }
1572 } else { 1576 } else {
1573 if (is_trampoline_emitted()) { 1577 if (is_trampoline_emitted()) {
1574 Label skip; 1578 if (cond != cc_always) {
1575 Condition neg_cond = NegateCondition(cond); 1579 Label skip;
1576 BranchShort(&skip, neg_cond, rs, rt); 1580 Condition neg_cond = NegateCondition(cond);
1577 Jr(L, bdslot); 1581 BranchShort(&skip, neg_cond, rs, rt);
1578 bind(&skip); 1582 Jr(L, bdslot);
1583 bind(&skip);
1584 } else {
1585 Jr(L, bdslot);
1586 }
1579 } else { 1587 } else {
1580 BranchShort(L, cond, rs, rt, bdslot); 1588 BranchShort(L, cond, rs, rt, bdslot);
1581 } 1589 }
1582 } 1590 }
1583 } 1591 }
1584 1592
1585 1593
1586 void MacroAssembler::Branch(Label* L, 1594 void MacroAssembler::Branch(Label* L,
1587 Condition cond, 1595 Condition cond,
1588 Register rs, 1596 Register rs,
(...skipping 4154 matching lines...) Expand 10 before | Expand all | Expand 10 after
5743 opcode == BGTZL); 5751 opcode == BGTZL);
5744 opcode = (cond == eq) ? BEQ : BNE; 5752 opcode = (cond == eq) ? BEQ : BNE;
5745 instr = (instr & ~kOpcodeMask) | opcode; 5753 instr = (instr & ~kOpcodeMask) | opcode;
5746 masm_.emit(instr); 5754 masm_.emit(instr);
5747 } 5755 }
5748 5756
5749 5757
5750 } } // namespace v8::internal 5758 } } // namespace v8::internal
5751 5759
5752 #endif // V8_TARGET_ARCH_MIPS 5760 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698