Infinite recursion with memcpy and memset/memclr lowerings
Mike Franklin
slavo5150 at yahoo.com
Thu Jul 19 22:36:37 UTC 2018
On Thursday, 19 July 2018 at 14:51:02 UTC, kinke wrote:
> Related:
> https://users.rust-lang.org/t/--aeabi-memclr-compiling-to-suicide-loop/4451
>
> I don't know how to prevent LLVM from assuming the compiler-rt
> builtins are available.
>
> If you don't insist on implementing everything yourself, you
> could use LLVM's implementations in compiler-rt, e.g., by a
> simple forward declaration or by using the LLVM memset
> intrinsic (see ldc.intrinsics) and obviously linking against
> the compiler-rt builtins lib (e.g.,
> https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/arm/aeabi_memset.S).
Correct me if I'm wrong, but it appears that forwarding to
compiler-rt's implementation or using `ldc.intrinsics` will
require linking in a C standard library. I'd prefer to avoid
that.
Mike
More information about the digitalmars-d-ldc
mailing list