This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Fix issue with offset operand of BALC and BC instructions
ClosedPublic

Authored by zoran.jovanovic on Nov 18 2015, 4:20 AM.

Details

Summary

Value of offset operand for microMIPS BALC and BC instructions is currently shifted 2 bits, but it should be 1 bit.

Diff Detail

Repository
rL LLVM

Event Timeline

zoran.jovanovic retitled this revision from to [mips][microMIPS] Fix issue with offset operand of BALC and BC instructions.
zoran.jovanovic updated this object.
zoran.jovanovic added a subscriber: llvm-commits.
dsanders accepted this revision.Nov 27 2015, 2:01 AM
dsanders edited edge metadata.

LGTM with a couple nits

lib/Target/Mips/Disassembler/MipsDisassembler.cpp
1869 ↗(On Diff #40493)

They're functionally the same thing but I'd slightly prefer '<< 1' over '* 2' since we're talking about shifting bits rather than arithmetic.

lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
356–359 ↗(On Diff #40493)

Please format as clang-format would.

This revision is now accepted and ready to land.Nov 27 2015, 2:01 AM
This revision was automatically updated to reflect the committed changes.