utiliD: A library with absolutely no dependencies for bare-metal programming and bootstrapping other D libraries
Johan Engelen
j at j.nl
Fri May 10 17:55:53 UTC 2019
On Friday, 10 May 2019 at 17:16:24 UTC, Mike Franklin wrote:
> On Friday, 10 May 2019 at 05:20:59 UTC, Eugene Wissner wrote:
>> - Memcmp, memcpy, memmove and memset are named equal, copy,
>> copyBackward and fill respectively. I just wanted to create
>> native implementations that are bit safer than their C
>> counterparts. So they do the same job, but accept void[]
>> instead of pointers. There are also templated functions with
>> the same names, that work with ranges.
>>
>> I‘m not very comfortable with GCC‘s inline asm and it doesn‘t
>> support naked asm as DMD does, so I put asm in the .S files
>> and compile them separately. But I‘m fine with inline asm too.
Why would you use inline assembly ? (generalizing but: extremely
bad portability, bad performance, bad readability)
Recent discussion on LLVM mailinglist about the problem of the
optimizer recognizing memcmp implementation and substituting it
with a call to memcmp:
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131973.html
cheers,
Johan
More information about the Digitalmars-d-announce
mailing list