Revert "Introduce a NearLabel in thumb2."
Fails some benchmarks and libcore tests.
This reverts commit db0bbab279534974dca507946c66cff2d05dc9f9.
Change-Id: I5d1afef5ede87e65d61f49529027c5c2f35b17fb
diff --git a/compiler/utils/arm/assembler_thumb2.cc b/compiler/utils/arm/assembler_thumb2.cc
index c3b19da..75f2b77 100644
--- a/compiler/utils/arm/assembler_thumb2.cc
+++ b/compiler/utils/arm/assembler_thumb2.cc
@@ -671,17 +671,11 @@
EmitVFPddd(cond, B23 | B21 | B20 | B18 | B16 | B6, dd, D0, D0);
}
-
void Thumb2Assembler::b(Label* label, Condition cond) {
EmitBranch(cond, label, false, false);
}
-void Thumb2Assembler::b(NearLabel* label, Condition cond) {
- EmitBranch(cond, label, false, false, true /* is_near */);
-}
-
-
void Thumb2Assembler::bl(Label* label, Condition cond) {
CheckCondition(cond);
EmitBranch(cond, label, true, false);
@@ -1619,7 +1613,7 @@
}
-void Thumb2Assembler::EmitBranch(Condition cond, Label* label, bool link, bool x, bool is_near) {
+void Thumb2Assembler::EmitBranch(Condition cond, Label* label, bool link, bool x) {
uint32_t pc = buffer_.Size();
Branch::Type branch_type;
if (cond == AL) {
@@ -1650,8 +1644,8 @@
}
} else {
// Branch is to an unbound label. Emit space for it.
- uint16_t branch_id = AddBranch(branch_type, pc, cond, is_near); // Unresolved branch.
- if (force_32bit_ || (!CanRelocateBranches() && !is_near)) {
+ uint16_t branch_id = AddBranch(branch_type, pc, cond); // Unresolved branch.
+ if (!CanRelocateBranches() || force_32bit_) {
Emit16(static_cast<uint16_t>(label->position_)); // Emit current label link.
Emit16(0); // another 16 bits.
} else {
@@ -2756,11 +2750,6 @@
}
-void Thumb2Assembler::CompareAndBranchIfZero(Register r, NearLabel* label) {
- cbz(r, label);
-}
-
-
void Thumb2Assembler::CompareAndBranchIfNonZero(Register r, Label* label) {
if (CanRelocateBranches()) {
cbnz(r, label);