<div dir="ltr"><div>Hello all,</div><div><br></div><div>I noticed that for ARM Thumb target, llc uses r7 as frame pointer (gcc does not do this AFAIK), and this register should therefore not be used as a general-purpose register.</div><div><br></div><div>However, when compiling mbedTLS, which contains some code that is highly optimized for ARM platform and uses r7 to efficiently perform an operation. This raises an exception since r7 is now the frame pointer.</div><div><br></div><div>I tried passing -fomit-frame-pointer but this is just a hacky workaround and does not work in this case, since the function here does indeed need frame pointer.<br></div><div>```<br></div><div>The <code>-fomit-frame-pointer</code> option instructs
        the compiler to not store stack frame pointers if the function does not need it. You can use
        this option to reduce the code image size.</div><div>```</div><div><br></div><div>My question is, how can I instruct the register allocator to use another register as frame pointer, or at least turn off the use of frame pointer? I tried changing the ABI with -mabi and -meabi but nothing works so far.</div><div><br></div><div>Thanks a lot for your help,</div><div><br></div><div>Cheers,</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div></div>