Add support for this target hook, covering MIPS, microMIPS and MIPSR6, along
with some tests. Also add missing getOppositeBranchOpc() cases exposed by the
tests.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 18063 Build 18063: arc lint + arc unit
Event Timeline
lib/Target/Mips/MipsInstrInfo.cpp | ||
---|---|---|
370–392 | Is this offset correct here? |
lib/Target/Mips/MipsLongBranch.cpp | ||
---|---|---|
588 | If this part is removed, then the below estimation for the NaCl will be estimated several times more. |
lib/Target/Mips/MipsInstrInfo.cpp | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
370–392 | Yes, that's an error. BC(1|2)(EQ|NE)ZC, B{...}ZALC, B((N|O)VC have 17 bit offsets, the rest have 18 bit offsets. | |||||||||||||
lib/Target/Mips/MipsLongBranch.cpp | ||||||||||||||
588 | Yes, but we're checking a wider / different range. The old logic is testing if the encoded offset (i.e. we have right shifted the value) would fit in a 16 bit offset in the instruction. The new logic is testing if the offset in bytes is in range of the branch instructions without the right shift.
|
lib/Target/Mips/MipsLongBranch.cpp | ||
---|---|---|
588 | Oh yes, it's true. I didn't connect these things immediately. |
Is this offset correct here?
I find in documentation that offset is 16 bits for these instructions, and can't figure out why is it compared here to 20 bits.