Index: src/arm/simulator-arm.cc |
diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc |
index afe31db95063ec4c214049dbdb52bda4717ecbb7..44c3e7483a52415874b7e8c5e90e7f51e6404f15 100644 |
--- a/src/arm/simulator-arm.cc |
+++ b/src/arm/simulator-arm.cc |
@@ -3727,11 +3727,14 @@ void Simulator::DecodeType6CoprocessorIns(Instruction* instr) { |
} |
int32_t address = get_register(rn) + 4 * offset; |
+ // Load and store address for singles must be at least four-byte |
+ // aligned. |
+ DCHECK((address % 4) == 0); |
if (instr->HasL()) { |
- // Load double from memory: vldr. |
+ // Load single from memory: vldr. |
set_s_register_from_sinteger(vd, ReadW(address, instr)); |
} else { |
- // Store double to memory: vstr. |
+ // Store single to memory: vstr. |
WriteW(address, get_sinteger_from_s_register(vd), instr); |
} |
break; |
@@ -3780,6 +3783,9 @@ void Simulator::DecodeType6CoprocessorIns(Instruction* instr) { |
offset = -offset; |
} |
int32_t address = get_register(rn) + 4 * offset; |
+ // Load and store address for doubles must be at least four-byte |
+ // aligned. |
+ DCHECK((address % 4) == 0); |
if (instr->HasL()) { |
// Load double from memory: vldr. |
int32_t data[] = { |