<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Your question isn't really clear what
kind of offset you need, or exactly you're planning to do with the
offset.<br>
<br>
In assembly, if you have two labels in the same section, you can
write the offset between them using subtraction, e.g. ".L3 -
.L1". The assembler will resolve this to an actual number.<br>
<br>
-Eli<br>
<br>
On 1/23/2017 9:29 AM, fami Hoseini via llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CAOQsd8ZnHUOmfEFbRGnEM=LLnyGWUqErY7w+_PTz3TLXoGUQkg@mail.gmail.com"
type="cite">
<div dir="ltr">I don't know if my question was super easy or maybe
it is not clear. I'm still in need of the answer and appreciate
any help.When LLVM creates assembly code it should somehow
create instructions' program counter (offset) right? how to get
this information?
<div><br>
</div>
<div>Thank you,</div>
<div>Fateme<br>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jan 9, 2017 at 5:07 PM, fami
Hoseini <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:hoseini.f@gmail.com" target="_blank">hoseini.f@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,
<div>Is there a way to get instruction's offset at compile
time with llvm for ARM?</div>
<div>I am trying to create a map between instructions at
compile time and this run-time info. Since PC is a
relative value, I am trying to use the instruction's
offset as a constant property of instruction to create
this map. I think offset information should be available
to create the executable, if so where to find it?</div>
<div>Thank you for your help,</div>
<div>Fami</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
</body>
</html>