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

Side by Side Diff: runtime/vm/assembler_mips.cc

Issue 131103025: Fixes ABI bug in MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « runtime/vm/assembler_mips.h ('k') | runtime/vm/instructions_mips.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ASSERT((high == Instr::kNopInstruction) && (low == Instr::kNopInstruction)); 107 ASSERT((high == Instr::kNopInstruction) && (low == Instr::kNopInstruction));
108 } 108 }
109 }; 109 };
110 110
111 111
112 void Assembler::EmitFarJump(int32_t offset, bool link) { 112 void Assembler::EmitFarJump(int32_t offset, bool link) {
113 ASSERT(use_far_branches()); 113 ASSERT(use_far_branches());
114 const uint16_t low = Utils::Low16Bits(offset); 114 const uint16_t low = Utils::Low16Bits(offset);
115 const uint16_t high = Utils::High16Bits(offset); 115 const uint16_t high = Utils::High16Bits(offset);
116 buffer_.EmitFixup(new PatchFarJump()); 116 buffer_.EmitFixup(new PatchFarJump());
117 lui(TMP, Immediate(high)); 117 lui(T9, Immediate(high));
118 ori(TMP, TMP, Immediate(low)); 118 ori(T9, T9, Immediate(low));
119 if (link) { 119 if (link) {
120 EmitRType(SPECIAL, TMP, R0, RA, 0, JALR); 120 EmitRType(SPECIAL, T9, R0, RA, 0, JALR);
121 } else { 121 } else {
122 EmitRType(SPECIAL, TMP, R0, R0, 0, JR); 122 EmitRType(SPECIAL, T9, R0, R0, 0, JR);
123 } 123 }
124 } 124 }
125 125
126 126
127 static Opcode OppositeBranchOpcode(Opcode b) { 127 static Opcode OppositeBranchOpcode(Opcode b) {
128 switch (b) { 128 switch (b) {
129 case BEQ: return BNE; 129 case BEQ: return BNE;
130 case BNE: return BEQ; 130 case BNE: return BEQ;
131 case BGTZ: return BLEZ; 131 case BGTZ: return BLEZ;
132 case BLEZ: return BGTZ; 132 case BLEZ: return BGTZ;
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 Emit(reinterpret_cast<int32_t>(message)); 1053 Emit(reinterpret_cast<int32_t>(message));
1054 Bind(&msg); 1054 Bind(&msg);
1055 break_(Instr::kMsgMessageCode); 1055 break_(Instr::kMsgMessageCode);
1056 } 1056 }
1057 #endif 1057 #endif
1058 } 1058 }
1059 1059
1060 } // namespace dart 1060 } // namespace dart
1061 1061
1062 #endif // defined TARGET_ARCH_MIPS 1062 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/instructions_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698