summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-09-29 10:37:49 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-09-29 10:37:49 +0000
commit9139578addd6d0e51088fc45bfc0972fc97939b7 (patch)
treebbaf5649a4dcda99d0815a14993ecb0157386921 /compiler/dex/quick/codegen_util.cc
parentd8750f3ce82225013f078c98caec0c8922a3689a (diff)
parent97a87ec836ff8f480af1166d05b92dad1c5daadd (diff)
Merge "Quick: Avoid shifting -1 left (undefined behavior)."
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index 7082bedc5e..d5ac34186b 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -1126,7 +1126,7 @@ CompiledMethod* Mir2Lir::GetCompiledMethod() {
for (size_t i = 0 ; i < core_vmap_table_.size(); ++i) {
// Copy, stripping out the phys register sort key.
vmap_encoder.PushBackUnsigned(
- ~(-1 << VREG_NUM_WIDTH) & (core_vmap_table_[i] + VmapTable::kEntryAdjustment));
+ ~(~0u << VREG_NUM_WIDTH) & (core_vmap_table_[i] + VmapTable::kEntryAdjustment));
}
// Push a marker to take place of lr.
vmap_encoder.PushBackUnsigned(VmapTable::kAdjustedFpMarker);
@@ -1141,7 +1141,7 @@ CompiledMethod* Mir2Lir::GetCompiledMethod() {
for (size_t i = 0 ; i < fp_vmap_table_.size(); ++i) {
// Copy, stripping out the phys register sort key.
vmap_encoder.PushBackUnsigned(
- ~(-1 << VREG_NUM_WIDTH) & (fp_vmap_table_[i] + VmapTable::kEntryAdjustment));
+ ~(~0u << VREG_NUM_WIDTH) & (fp_vmap_table_[i] + VmapTable::kEntryAdjustment));
}
}
} else {