Thread overview
Do we have an equivalent of __builtin_return_address?
Apr 06, 2016
Adam D. Ruppe
Apr 06, 2016
Kai Nacke
Apr 06, 2016
Johannes Pfau
April 06, 2016
i.e. https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html -- Andrei
April 06, 2016
On Wednesday, 6 April 2016 at 13:23:20 UTC, Andrei Alexandrescu wrote:
> i.e. https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html -- Andrei

The exception mechanism does this kind of thing if nothing else does.
April 06, 2016
On Wednesday, 6 April 2016 at 13:23:20 UTC, Andrei Alexandrescu wrote:
> i.e. https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html -- Andrei

http://llvm.org/docs/LangRef.html#id1204, available in ldc.intrinsics

Regards,
Kai
April 06, 2016
On 04/06/2016 11:58 AM, Kai Nacke wrote:
> On Wednesday, 6 April 2016 at 13:23:20 UTC, Andrei Alexandrescu wrote:
>> i.e. https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html -- Andrei
>
> http://llvm.org/docs/LangRef.html#id1204, available in ldc.intrinsics
>
> Regards,
> Kai

Thanks. Could we unify it across backends? -- Andrei

April 06, 2016
Am Wed, 6 Apr 2016 12:40:24 -0400
schrieb Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org>:

> On 04/06/2016 11:58 AM, Kai Nacke wrote:
> > On Wednesday, 6 April 2016 at 13:23:20 UTC, Andrei Alexandrescu wrote:
> >> i.e. https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html -- Andrei
> >
> > http://llvm.org/docs/LangRef.html#id1204, available in ldc.intrinsics
> >
> > Regards,
> > Kai
> 
> Thanks. Could we unify it across backends? -- Andrei
> 

All GCC builtins are available in GDC. Just import gcc.builtins: http://goo.gl/vYhfsC

Unification should probably be done in druntime. I don't see a point in implementing special handling for one builtin in the ldc or gdc compilers as we already handle many (or all) builtins in the compiler in some generic way.