| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "courgette/disassembler_elf_32_arm.h" | 5 #include "courgette/disassembler_elf_32_arm.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 return 2; | 208 return 2; |
| 209 case ARM_OFF11: | 209 case ARM_OFF11: |
| 210 return 2; | 210 return 2; |
| 211 case ARM_OFF24: | 211 case ARM_OFF24: |
| 212 return 4; | 212 return 4; |
| 213 case ARM_OFF25: | 213 case ARM_OFF25: |
| 214 return 4; | 214 return 4; |
| 215 case ARM_OFF21: | 215 case ARM_OFF21: |
| 216 return 4; | 216 return 4; |
| 217 default: | 217 default: |
| 218 return -1; | 218 return 0xFFFF; |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 CheckBool DisassemblerElf32ARM::TypedRVAARM::ComputeRelativeTarget( | 222 CheckBool DisassemblerElf32ARM::TypedRVAARM::ComputeRelativeTarget( |
| 223 const uint8* op_pointer) { | 223 const uint8* op_pointer) { |
| 224 arm_op_ = op_pointer; | 224 arm_op_ = op_pointer; |
| 225 switch (type_) { | 225 switch (type_) { |
| 226 case ARM_OFF8: | 226 case ARM_OFF8: |
| 227 // Fall through | 227 // Fall through |
| 228 case ARM_OFF11: { | 228 case ARM_OFF11: { |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 // Move 2 bytes at a time, but track 32-bit boundaries | 479 // Move 2 bytes at a time, but track 32-bit boundaries |
| 480 p += 2; | 480 p += 2; |
| 481 on_32bit = ((on_32bit + 1) % 2) != 0; | 481 on_32bit = ((on_32bit + 1) % 2) != 0; |
| 482 } | 482 } |
| 483 } | 483 } |
| 484 | 484 |
| 485 return true; | 485 return true; |
| 486 } | 486 } |
| 487 | 487 |
| 488 } // namespace courgette | 488 } // namespace courgette |
| OLD | NEW |