Jump to page: 1 2
Thread overview
[Issue 19946] In betterC filling an array with a non-zero value fails for types of size > 1 due to missing _memset16/_memset32/etc.
Jun 07, 2019
Nathan S.
Mar 23, 2021
Nathan S.
May 30
RazvanN
Jun 02
Dennis
Jun 02
mhh
Jun 03
RazvanN
Jun 03
mhh
Jun 08
Dennis
Jun 08
Dennis
Jun 08
Dennis
Jun 08
Dlang Bot
June 07, 2019
https://issues.dlang.org/show_bug.cgi?id=19946

Nathan S. <n8sh.secondary@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |betterC
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=19561

--
March 23, 2021
https://issues.dlang.org/show_bug.cgi?id=19946

Nathan S. <n8sh.secondary@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |21750


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=21750
[Issue 21750] -betterC undefined reference to _memsetn
--
February 10
https://issues.dlang.org/show_bug.cgi?id=19946

Paul Backus <snarwin+bugzilla@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thomas.bockman@gmail.com

--- Comment #1 from Paul Backus <snarwin+bugzilla@gmail.com> ---
*** Issue 21879 has been marked as a duplicate of this issue. ***

--
February 10
https://issues.dlang.org/show_bug.cgi?id=19946
Issue 19946 depends on issue 21750, which changed state.

Issue 21750 Summary: -betterC undefined reference to _memsetn https://issues.dlang.org/show_bug.cgi?id=21750

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--
February 10
https://issues.dlang.org/show_bug.cgi?id=19946

Paul Backus <snarwin+bugzilla@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ryuukk.dev@gmail.com

--- Comment #2 from Paul Backus <snarwin+bugzilla@gmail.com> ---
*** Issue 21750 has been marked as a duplicate of this issue. ***

--
May 30
https://issues.dlang.org/show_bug.cgi?id=19946

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com
           Severity|normal                      |regression

--
June 02
https://issues.dlang.org/show_bug.cgi?id=19946

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl

--- Comment #3 from Dennis <dkorpel@live.nl> ---
These functions are defined in druntime's rt/memset, which is not linked with betterC. I'm not sure what the best fix is. The functions could be emitted in every translation unit that relies on them. Or, the code needs to be always inlined (though since some memset functions use inline asm, dmd cannot inline it currently).

--
June 02
https://issues.dlang.org/show_bug.cgi?id=19946

mhh <maxhaton@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxhaton@gmail.com

--- Comment #4 from mhh <maxhaton@gmail.com> ---
The fix is easy. I wrote the code but never got around to pushing it.

It just needs to be a template in druntime. Hypothetically you could make it inline a loop but this might hurt LDC and GDC.

arrayOp actually supports memset but making the array lowering use arrayOp would make it end up using itself.

I also looked into using an arbitrary set memset in the backend but yuck.

--
June 03
https://issues.dlang.org/show_bug.cgi?id=19946

--- Comment #5 from RazvanN <razvan.nitu1305@gmail.com> ---
(In reply to mhh from comment #4)
> The fix is easy. I wrote the code but never got around to pushing it.
> 
> It just needs to be a template in druntime. Hypothetically you could make it inline a loop but this might hurt LDC and GDC.

Besides making it a template, you also need to move the call insertion from e2ir to the frontend so that semantic analysis is performed on the instantiation.

> 
> arrayOp actually supports memset but making the array lowering use arrayOp would make it end up using itself.
> 
> I also looked into using an arbitrary set memset in the backend but yuck.

I think that long-term the best solution would be to lower the code in the frontend and, indeed, lower the hooks to templates.

--
June 03
https://issues.dlang.org/show_bug.cgi?id=19946

--- Comment #6 from mhh <maxhaton@gmail.com> ---
I am aware.

I actually think we should have another dmd-only semantic pass just for this in dmd because the existing code is a complete mess.

The case for array assign operations for example is just a branch in a hundreds of line visitor member.

--
« First   ‹ Prev
1 2