I have been struggling with this for way too long now, so hopefully the mighty list can help:<div><br></div><div>I am trying to generate a byte store instruction storing the constant value 4 at some given address</div><div>
in a new helper function inside ARMISelLowering.cpp</div><div><br></div><div>I tried:</div><div><br></div><div><div> SDValue Val = DAG.getConstant(4, MVT::i8);</div><div><div> SDValue Store = DAG.getStore(chain,</div><div>
dl,</div><div> Val,</div><div> Addr,</div><div> MachinePointerInfo(),</div><div> false, false, 0);</div>
</div></div><div><br></div><div><br></div><div>This gives me a a legalizer assert for MVT::i8.</div><div><br></div><div>If I change it to MVT::i32 the code works but instead of</div><div>a single byte store (STRB) I get a word store (STR).</div>
<div><br></div><div>How can I force the width of the store?</div><div><br></div><div>Thanks,</div><div>Robert</div><div><br></div><div><br></div>