<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 11/08/13 13:13, Chris Lattner wrote:<br>
</div>
<blockquote
cite="mid:E37009A3-B583-4DB4-9302-CBBE07AE71F7@apple.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
On Nov 6, 2013, at 5:46 PM, Behan Webster <<a
moz-do-not-send="true" href="mailto:behanw@converseincode.com">behanw@converseincode.com</a>>
wrote:<br>
<div>
<blockquote type="cite">
<div style="font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
0px;">Another way would be to introduce a new builtin in
parallel to others<br>
like __builtin_return_address(). Essentially adding a<br>
__builtin_stack_pointer() which does what the above code
does. The idea<br>
would be to get something like this added to both clang and
gcc in order<br>
to make this work across compilers, and across arches.<br>
<br>
It ends up being a trivial patch for clang (see below).
We're still<br>
looking for someone to help us on the gcc side.<br>
</div>
</blockquote>
<div dir="auto"><br>
</div>
<div dir="auto">From my perspective, adding
__builtin_stack_pointer() makes perfect sense. Mapping it to
Intrinsic::stacksave does not though, it should map down to a
new llvm.stackpointer() intrinsic, and the code generator
should turn it into the stack pointer register at isel time.</div>
<div dir="auto"><br>
</div>
<div dir="auto">-Chris</div>
</div>
</blockquote>
Okay, maybe not so trivial. :)<br>
<br>
Yours however, is a much cleaner solution.<br>
<br>
Thanks,<br>
<br>
Behan<br>
<pre class="moz-signature" cols="72">--
Behan Webster
<a class="moz-txt-link-abbreviated" href="mailto:behanw@converseincode.com">behanw@converseincode.com</a></pre>
</body>
</html>