Fix for the upper bound check that was causing a build failure.
Details
Details
Diff Detail
Diff Detail
- Repository
 - rL LLVM
 
Event Timeline
| lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | ||
|---|---|---|
| 582 ↗ | (On Diff #68015) | The 4-byte offset is being applied a few lines down, so should this actually be checking for the range [4, 130]?  | 
| lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | ||
|---|---|---|
| 582 ↗ | (On Diff #68015) | The valid range is actually [2, 130] as offsets of 2 are relaxed to NOP. But yes I forgot to take the offset correction below into account.  | 
| test/MC/ARM/thumb-cb-negative-offsets.s | ||
|---|---|---|
| 23 ↗ | (On Diff #68035) | The label is in-range of this instruction.  | 
| 26 ↗ | (On Diff #68035) | This should probably be a nop, since we are branching to it. I'd suggest making this two nops, with a label for each, so that you can test the exact bound on the offset for both instructions.  | 
| test/MC/ARM/thumb-cb-negative-offsets.s | ||
|---|---|---|
| 27 ↗ | (On Diff #68037) | This test won't fail if an error is emitted for this instruction. You'll need a CHECK-NOT line to ensure that no further diagnostics are emitted.  |