diff options
author | 2015-08-25 18:23:20 +0100 | |
---|---|---|
committer | 2015-08-25 18:23:20 +0100 | |
commit | 23f02f31a8368d256d45b441384432c6bece064a (patch) | |
tree | 74c140eb78a6a628e36f04df631d49d97592a529 /compiler/utils/arm/assembler_thumb2.cc | |
parent | 6bd6a830f24033830a910f88928b400a7ed28418 (diff) |
Minor changes to art::arm::Thumb2Assembler::StoreToOffset.
- Use CHECK instead of DCHECK for consistency reasons.
- Adjust documentation.
- Stylistic changes.
Change-Id: Ibc8261a0eb5a8b4d62edc1df0d5fb378e5021c22
Diffstat (limited to 'compiler/utils/arm/assembler_thumb2.cc')
-rw-r--r-- | compiler/utils/arm/assembler_thumb2.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/utils/arm/assembler_thumb2.cc b/compiler/utils/arm/assembler_thumb2.cc index b499dddb0c..4e918e9574 100644 --- a/compiler/utils/arm/assembler_thumb2.cc +++ b/compiler/utils/arm/assembler_thumb2.cc @@ -3299,17 +3299,17 @@ void Thumb2Assembler::StoreToOffset(StoreOperandType type, Register tmp_reg = kNoRegister; if (!Address::CanHoldStoreOffsetThumb(type, offset)) { CHECK_NE(base, IP); - if (reg != IP && - (type != kStoreWordPair || reg + 1 != IP)) { + if ((reg != IP) && + ((type != kStoreWordPair) || (reg + 1 != IP))) { tmp_reg = IP; } else { // Be careful not to use IP twice (for `reg` (or `reg` + 1 in - // the case of a word-pair store)) and to build the Address - // object used by the store instruction(s) below). Instead, - // save R5 on the stack (or R6 if R5 is not available), use it - // as secondary temporary register, and restore it after the - // store instruction has been emitted. - tmp_reg = base != R5 ? R5 : R6; + // the case of a word-pair store) and `base`) to build the + // Address object used by the store instruction(s) below. + // Instead, save R5 on the stack (or R6 if R5 is already used by + // `base`), use it as secondary temporary register, and restore + // it after the store instruction has been emitted. + tmp_reg = (base != R5) ? R5 : R6; Push(tmp_reg); if (base == SP) { offset += kRegisterSize; @@ -3338,8 +3338,8 @@ void Thumb2Assembler::StoreToOffset(StoreOperandType type, LOG(FATAL) << "UNREACHABLE"; UNREACHABLE(); } - if (tmp_reg != kNoRegister && tmp_reg != IP) { - DCHECK(tmp_reg == R5 || tmp_reg == R6); + if ((tmp_reg != kNoRegister) && (tmp_reg != IP)) { + CHECK((tmp_reg == R5) || (tmp_reg == R6)); Pop(tmp_reg); } } |