Re: Broken examples

2021-03-06 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 6 March 2021 at 01:30:35 UTC, MoonlightSentinel wrote: On Friday, 5 March 2021 at 22:01:37 UTC, Imperatorn wrote: Any idea why? The examples are compiled using an older host compiler (__VERSION__ is 2.093) but use features introduced in a later version. This will be fixed by

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 6 March 2021 at 11:57:13 UTC, Imperatorn wrote: What... Is this really how it's supposed to be? Makes no sense to not use any of the existing conventions. extern(C) and extern(D) are both documented to be the same as the platform's C calling convention everywhere except x86

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread kinke via Digitalmars-d-learn
On Saturday, 6 March 2021 at 12:29:07 UTC, kinke wrote: There are other slight breakages of that 'spec', e.g., LDC's extern(D) ABI is very similar to Microsoft's __vectorcall (so that e.g. vectors are passed in registers). [Windows only, to prevent any more confusion.]

Re: How to get output of piped process?

2021-03-06 Thread Imperatorn via Digitalmars-d-learn
On Wednesday, 3 March 2021 at 20:43:54 UTC, Danny Arends wrote: On Monday, 22 February 2021 at 14:52:22 UTC, frame wrote: On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote: https://github.com/DannyArends/DaNode/blob/master/danode/process.d Danny This example shows how easy

Re: Broken examples

2021-03-06 Thread Ali Çehreli via Digitalmars-d-learn
On 3/6/21 12:15 AM, Imperatorn wrote: On Saturday, 6 March 2021 at 01:30:35 UTC, MoonlightSentinel wrote: On Friday, 5 March 2021 at 22:01:37 UTC, Imperatorn wrote: Any idea why? The examples are compiled using an older host compiler (__VERSION__ is 2.093) but use features introduced in a

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread kinke via Digitalmars-d-learn
On Saturday, 6 March 2021 at 12:15:43 UTC, Mike Parker wrote: On Saturday, 6 March 2021 at 11:57:13 UTC, Imperatorn wrote: What... Is this really how it's supposed to be? Makes no sense to not use any of the existing conventions. extern(C) and extern(D) are both documented to be the same as

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread kinke via Digitalmars-d-learn
On Friday, 5 March 2021 at 12:57:43 UTC, z wrote: XMM registers work, but as soon as they are changed into YMM DMD outputs "bad type/size of operands %s" and LDC outputs an "label YMM0 is undefined" error. Are they not supported? To illutrate : https://run.dlang.io/is/IqDHlK LDC's support

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread Rumbu via Digitalmars-d-learn
On Friday, 5 March 2021 at 21:47:49 UTC, z wrote: On Friday, 5 March 2021 at 16:10:02 UTC, Rumbu wrote: First of all, in 64 bit ABI, parameters are not passed on stack, therefore a[RBP] is a nonsense. void complement32(simdbytes* a, simdbytes* b) a is in RCX, b is in RDX on Windows a is in

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 6 March 2021 at 10:45:08 UTC, Rumbu wrote: On Friday, 5 March 2021 at 21:47:49 UTC, z wrote: [...] I just made some tests, it seems that D has invented his own calling convention. And it's not documented. If you decorate your function with extern(C) it should respect the

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 6 March 2021 at 15:40:56 UTC, Rumbu wrote: On Saturday, 6 March 2021 at 12:15:43 UTC, Mike Parker wrote: [...] Where exactly is documented the extern(D) x86-64 calling convention? Because currently seems like a mess according to the dissasembly. First X parameters on stack from

Re: tiny alternative to std library

2021-03-06 Thread Kagamin via Digitalmars-d-learn
I suppose commercial vendors aren't interested in suckless paradigm, so this library is for people and only for people.

Re: Broken examples

2021-03-06 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 6 March 2021 at 09:38:54 UTC, Ali Çehreli wrote: On 3/6/21 12:15 AM, Imperatorn wrote: On Saturday, 6 March 2021 at 01:30:35 UTC, MoonlightSentinel wrote: [...] Are you sure? 樂 I tried switching to dmd-beta, dmd-nightly, ldc and ldc-beta and none of them worked. Are you

Re: Checking for manifest constants

2021-03-06 Thread bogdan via Digitalmars-d-learn
On Friday, 5 March 2021 at 14:42:07 UTC, Petar Kirov [ZombineDev] wrote: On Friday, 5 March 2021 at 08:23:09 UTC, Bogdan wrote: [...] I suggest this: enum globalConfig = 32; int globalValue = 22; immutable globaImmutablelValue = 22; enum isManifestConstant(alias symbol) =

dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-06 Thread kdevel via Digitalmars-d-learn
After replacing dmd with ldmd2 (LDC 1.25.1) I get tons of link errors all of the form mentioned in the subject. Any idea what can be done about it? (With a handcrafted single compile/link statement using ldc2 everything compiles but ideally I want to reuse my Makefile).

Re: How to get output of piped process?

2021-03-06 Thread kdevel via Digitalmars-d-learn
On Saturday, 6 March 2021 at 01:53:15 UTC, Jesse Phillips wrote: [...] I think this post is going to answer your need. https://dev.to/jessekphillips/piping-process-output-1cai I haven't read all the replies, so maybe you have it working and this will benefit someone else. If I understand

Re: dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-06 Thread Preetpal via Digitalmars-d-learn
On Saturday, 6 March 2021 at 22:14:26 UTC, kdevel wrote: After replacing dmd with ldmd2 (LDC 1.25.1) I get tons of link errors all of the form mentioned in the subject. Any idea what can be done about it? (With a handcrafted single compile/link statement using ldc2 everything compiles but

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread Rumbu via Digitalmars-d-learn
On Saturday, 6 March 2021 at 12:15:43 UTC, Mike Parker wrote: On Saturday, 6 March 2021 at 11:57:13 UTC, Imperatorn wrote: What... Is this really how it's supposed to be? Makes no sense to not use any of the existing conventions. extern(C) and extern(D) are both documented to be the same as

Re: Using YMM registers causes an undefined label error

2021-03-06 Thread Guillaume Piolat via Digitalmars-d-learn
On Saturday, 6 March 2021 at 16:09:03 UTC, Imperatorn wrote: On Saturday, 6 March 2021 at 15:40:56 UTC, Rumbu wrote: On Saturday, 6 March 2021 at 12:15:43 UTC, Mike Parker wrote: [...] Where exactly is documented the extern(D) x86-64 calling convention? Because currently seems like a mess