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

Side by Side Diff: src/mips/assembler-mips-inl.h

Issue 1419793014: MIPS: JALR to JAL optimization removal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/mips/assembler-mips.cc ('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 1
2 // Copyright (c) 1994-2006 Sun Microsystems Inc. 2 // Copyright (c) 1994-2006 Sun Microsystems Inc.
3 // All Rights Reserved. 3 // All Rights Reserved.
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // - Redistributions of source code must retain the above copyright notice, 9 // - Redistributions of source code must retain the above copyright notice,
10 // this list of conditions and the following disclaimer. 10 // this list of conditions and the following disclaimer.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 bool Operand::is_reg() const { 82 bool Operand::is_reg() const {
83 return rm_.is_valid(); 83 return rm_.is_valid();
84 } 84 }
85 85
86 86
87 // ----------------------------------------------------------------------------- 87 // -----------------------------------------------------------------------------
88 // RelocInfo. 88 // RelocInfo.
89 89
90 void RelocInfo::apply(intptr_t delta) { 90 void RelocInfo::apply(intptr_t delta) {
91 if (IsCodeTarget(rmode_)) {
92 uint32_t scope1 = (uint32_t) target_address() & ~kImm28Mask;
93 uint32_t scope2 = reinterpret_cast<uint32_t>(pc_) & ~kImm28Mask;
94
95 if (scope1 != scope2) {
96 Assembler::JumpToJumpRegister(pc_);
97 }
98 }
99 if (IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)) { 91 if (IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)) {
100 // Absolute code pointer inside code object moves with the code object. 92 // Absolute code pointer inside code object moves with the code object.
101 byte* p = reinterpret_cast<byte*>(pc_); 93 byte* p = reinterpret_cast<byte*>(pc_);
102 int count = Assembler::RelocateInternalReference(rmode_, p, delta); 94 int count = Assembler::RelocateInternalReference(rmode_, p, delta);
103 CpuFeatures::FlushICache(p, count * sizeof(uint32_t)); 95 CpuFeatures::FlushICache(p, count * sizeof(uint32_t));
104 } 96 }
105 } 97 }
106 98
107 99
108 Address RelocInfo::target_address() { 100 Address RelocInfo::target_address() {
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 EmittedCompactBranchInstruction(); 456 EmittedCompactBranchInstruction();
465 } 457 }
466 CheckTrampolinePoolQuick(); 458 CheckTrampolinePoolQuick();
467 } 459 }
468 460
469 461
470 } // namespace internal 462 } // namespace internal
471 } // namespace v8 463 } // namespace v8
472 464
473 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 465 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698