ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
kristate has joined #zig
darithorn has joined #zig
Marumoto has joined #zig
darithorn has quit [Remote host closed the connection]
Marumoto has quit [Ping timeout: 264 seconds]
<diltsman>
How do I ignore the return value of memcpy (?[*]u8)
<daurnimator>
diltsman: assign to _
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate_ has joined #zig
kristate has quit [Ping timeout: 268 seconds]
<shachaf>
Hmm, does Zig have some notion of stack frames in an arena, where you can free everything up to a point instead of the whole arena at once?
<daurnimator>
shachaf: fixedbufferallocator ?
<shachaf>
What's the difference between this and ArenaAllocator?
<shachaf>
Neither of them seems to have this, anyway.
<diltsman>
__aeabi_memcpy4 is going to be fun to implement...
<diltsman>
Compiler-RT just has it call memcpy. Zig optimizes my copy of memcpy (local function named my_memcpy) to a call to __aeabi_memcpy4.
<daurnimator>
diltsman: huh..... I'm interested in hearing the solution :)
<diltsman>
daurnimator: My current best idea is to write it in in-line assembly. Not ideal, but the optimizer is going to cause me problems. Anything that could generate decent code will be rewritten as a call to __eabi_memcpy4.
<daurnimator>
diltsman: and what stops it from optimizing your inline assembly? :)
<diltsman>
I don't believe that LLVM IR moves most assembly into regular IR...
<diltsman>
SSE does have equivalents in the IR that it is lowered to, but not all in-line assembly does.
<daurnimator>
counting on the optimizer not being good enough always seems like a risky move
<diltsman>
I know, right?
<diltsman>
I will work on doing in-line assembly. If LLVM is like GCC, I believe there is a way to annotate an assembly block so that the optimizer will ignore it.
wootehfoot has quit [Read error: Connection reset by peer]
return0e_ has joined #zig
return0e has quit [Ping timeout: 255 seconds]
halosghost has quit [Quit: WeeChat 2.3]
<gamester>
I need to go to sleep, great stream!
gamester has left #zig ["Leaving"]
<diltsman>
andrewrk: The biggest downside of an assembly implementation is that it is opaque to the optimizer. Given that it would be behind an ABI primitive, that shouldn't be too big an issue.
<diltsman>
Also means that I have to look at the EABI specification to make sure that the __eabi_memcpy4 and __eabi_memcpy8 are correct, since they wouldn't be directly based on the compiler-RT implementation.