llvm-project
9105d9c2 - [lld][Hexagon] Fix findMaskR8 missing duplex support (#183936)

Commit
48 days ago
[lld][Hexagon] Fix findMaskR8 missing duplex support (#183936) findMaskR8() lacked an isDuplex() check, unlike findMaskR6(), findMaskR11(), and findMaskR16() which all handle duplex instructions. When the assembler generates R_HEX_8_X on a duplex SA1_addi instruction (e.g. `{ r0 = add(r0, ##target); memw(r1+#0) = r2 }`), the wrong mask 0x00001fe0 placed relocation bits at [12:5] instead of [25:20], corrupting the low sub-instruction (e.g. memw became memb). Add the isDuplex() check returning 0x03f00000, and add a comprehensive test covering all duplex instruction x relocation type combinations across findMaskR6, findMaskR8, findMaskR11, and findMaskR16.
Author
Parents
Loading