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

Unified Diff: courgette/disassembler_elf_32_arm.cc

Issue 613893002: Fix more MSVC warnings, courgette/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static_cast Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/disassembler_elf_32.cc ('k') | courgette/disassembler_win32_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_elf_32_arm.cc
diff --git a/courgette/disassembler_elf_32_arm.cc b/courgette/disassembler_elf_32_arm.cc
index f0f94b93362f28a239283a473d69458a8e5c80c5..800a64c7413d11ac8bbe09e6a9080f7669816378 100644
--- a/courgette/disassembler_elf_32_arm.cc
+++ b/courgette/disassembler_elf_32_arm.cc
@@ -38,7 +38,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva,
fflush(stdout);
(*addr) = temp;
- (*c_op) = (arm_op >> 8) | 0x1000;
+ (*c_op) = static_cast<uint16>(arm_op >> 8) | 0x1000;
break;
}
case ARM_OFF11: {
@@ -50,7 +50,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva,
temp += 4; // Offset from _next_ PC.
(*addr) = temp;
- (*c_op) = (arm_op >> 11) | 0x2000;
+ (*c_op) = static_cast<uint16>(arm_op >> 11) | 0x2000;
break;
}
case ARM_OFF24: {
@@ -101,7 +101,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva,
temp2 |= (arm_op & (1 << 15)) >> 13;
temp2 |= (arm_op & 0xF8000000) >> 24;
temp2 |= (prefetch & 0x0000000F) << 8;
- (*c_op) = temp2;
+ (*c_op) = static_cast<uint16>(temp2);
break;
}
case ARM_OFF21: {
@@ -122,7 +122,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva,
uint32 temp2 = 0x5000;
temp2 |= (arm_op & 0x03C00000) >> 22; // just save the cond
- (*c_op) = temp2;
+ (*c_op) = static_cast<uint16>(temp2);
break;
}
default:
« no previous file with comments | « courgette/disassembler_elf_32.cc ('k') | courgette/disassembler_win32_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698