The opcode for the bl branches can initially be F000 F800, i.e.
the J1 and J2 bits are already set. Therefore mask these bits out
before or'ing in the new bits.
Details
Details
- Reviewers
compnerd zatrazz ruiu peter.smith
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Hello Martin,
I'm away on holiday with limited internet and no access to a computer, so I can't check the details till I get back at some point next week. I suggest adding the code-owner for the COFF part of lld, Rui Ueyama as you'd likely need to get some input from him on the coding style.
COFF/Chunks.cpp | ||
---|---|---|
107 | Yeah, the bits need to be cleared out as the value may be altered by the new computation. There is no guarantee that the bits are set IIRC, so I find the comment misleading. You can add a comment along the lines of clear out the J1 and J2 bits which may be set, though, Im not sure if it really adds much value. |
COFF/Chunks.cpp | ||
---|---|---|
107 | Ok, uploading a new version of the patch with the comment changed. |
Yeah, the bits need to be cleared out as the value may be altered by the new computation.
There is no guarantee that the bits are set IIRC, so I find the comment misleading. You can add a comment along the lines of clear out the J1 and J2 bits which may be set, though, Im not sure if it really adds much value.