<div dir="ltr">Hi, <div>I have kept working on this and found the following (as llvm 3.5):</div><div>1) In the function MCObjectStreamer::EmitInstruction there is a check for the instruction being relaxable or not:</div><div><div> if (!Assembler.getBackend().mayNeedRelaxation(Inst)) {</div><div>    EmitInstToData(Inst, STI);</div><div>    return;</div><div>  }</div></div><div>At this stage, the instruction as been already selected to be ARM::ADR.</div><div>The call to mayNeed</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-07 18:06 GMT+03:00 Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 7 July 2015 at 06:06, Eric Bentura <<a href="mailto:ebentura@gmail.com">ebentura@gmail.com</a>> wrote:<br>
> I have created a small ll file to reproduce the problem.<br>
> I used the intrinsic function llvm.arm.space to introduce space between the<br>
> beginning of the code and the jump table.<br>
<br>
</span>It does look like the value in @llvm.arm.space is interpreted<br>
incorrectly if it's bigger than INT_MAX, but that's well outside its<br>
intended range and could inevitably be used to break ConstantIslands<br>
(the longest ARM immediate branch is 26-bits; no indivisible entity in<br>
.text can be bigger than that). It's probably an unrelated issue.<br>
<br>
Also, I know I said the backend should accept any size code, but 2GB<br>
is definitely going to trigger more edge cases than average.<br>
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>