| OLD | NEW | 
|---|
| 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"  // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_MIPS. | 
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) | 
| 7 | 7 | 
| 8 #include "vm/constants_mips.h" | 8 #include "vm/constants_mips.h" | 
| 9 #include "vm/instructions.h" | 9 #include "vm/instructions.h" | 
| 10 #include "vm/object.h" | 10 #include "vm/object.h" | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 66   uword i = Back(++end); | 66   uword i = Back(++end); | 
| 67   Instr* instr = Instr::At(reinterpret_cast<uword>(&i)); | 67   Instr* instr = Instr::At(reinterpret_cast<uword>(&i)); | 
| 68   ASSERT(instr->OpcodeField() == ORI); | 68   ASSERT(instr->OpcodeField() == ORI); | 
| 69   imm = instr->UImmField(); | 69   imm = instr->UImmField(); | 
| 70   *reg = instr->RtField(); | 70   *reg = instr->RtField(); | 
| 71 | 71 | 
| 72   i = Back(++end); | 72   i = Back(++end); | 
| 73   instr = Instr::At(reinterpret_cast<uword>(&i)); | 73   instr = Instr::At(reinterpret_cast<uword>(&i)); | 
| 74   ASSERT(instr->OpcodeField() == LUI); | 74   ASSERT(instr->OpcodeField() == LUI); | 
| 75   ASSERT(instr->RtField() == *reg); | 75   ASSERT(instr->RtField() == *reg); | 
| 76   imm |= instr->UImmField(); | 76   imm |= (instr->UImmField() << 16); | 
| 77   *value = imm; | 77   *value = imm; | 
| 78   return end; | 78   return end; | 
| 79 } | 79 } | 
| 80 | 80 | 
| 81 | 81 | 
| 82 // Decodes a load sequence ending at end. Returns the register being loaded and | 82 // Decodes a load sequence ending at end. Returns the register being loaded and | 
| 83 // the index in the pool being read from. | 83 // the index in the pool being read from. | 
| 84 // Returns the location of the load sequence, counting the number of | 84 // Returns the location of the load sequence, counting the number of | 
| 85 // instructions back from the end of the call pattern. | 85 // instructions back from the end of the call pattern. | 
| 86 int CallPattern::DecodeLoadWordFromPool(int end, Register* reg, int* index) { | 86 int CallPattern::DecodeLoadWordFromPool(int end, Register* reg, int* index) { | 
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 192   const uint16_t target_hi = target_address >> 16; | 192   const uint16_t target_hi = target_address >> 16; | 
| 193 | 193 | 
| 194   lui->SetInstructionBits((lui_bits & 0xffff0000) | target_hi); | 194   lui->SetInstructionBits((lui_bits & 0xffff0000) | target_hi); | 
| 195   ori->SetInstructionBits((ori_bits & 0xffff0000) | target_lo); | 195   ori->SetInstructionBits((ori_bits & 0xffff0000) | target_lo); | 
| 196 } | 196 } | 
| 197 | 197 | 
| 198 }  // namespace dart | 198 }  // namespace dart | 
| 199 | 199 | 
| 200 #endif  // defined TARGET_ARCH_MIPS | 200 #endif  // defined TARGET_ARCH_MIPS | 
| 201 | 201 | 
| OLD | NEW | 
|---|