www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Looking for someone that could work on 32 bits support for SDC

reply "deadalnix" <deadalnix gmail.com> writes:
All is in the title.

ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
valuable targets IMO.

I can provide support, but I just don't have the bandwidth to 
pull it by myself. If someone could step up, that'd be great.
Sep 09 2015
next sibling parent reply "Brandon Ragland" <brandon callmemaybe.com> writes:
On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.

 I can provide support, but I just don't have the bandwidth to 
 pull it by myself. If someone could step up, that'd be great.
I'd love to see MIPS support myself. It may be against my better judgment, but I'm more than willing t assist you on this. Care to elaborate on the more precise drill-down?
Sep 10 2015
parent reply "deadalnix" <deadalnix gmail.com> writes:
On Friday, 11 September 2015 at 01:12:21 UTC, Brandon Ragland 
wrote:
 On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.

 I can provide support, but I just don't have the bandwidth to 
 pull it by myself. If someone could step up, that'd be great.
I'd love to see MIPS support myself. It may be against my better judgment, but I'm more than willing t assist you on this. Care to elaborate on the more precise drill-down?
Sure. First thing first, try to checkout the project and get it to build and pass the tests (well, some tests will fail, but you should get 0 regressions). Step 2 would be to modify the test runner to be able to run in 64 or 32 bits. Some tests will have a different result in 32 bits, notably the ones that use the pointer size somewhere. (tests/runner.d) Step 3 add a m32/m64 flags to SDC. It is using the getopt from phobos and that should be fairly straightforward. (sdc/src/main.d) Step 4 go through the codegen (libd-llvm) and update it to take the flag into account. (that's the big chunk). There may be some places in the frontend that assume 64 bits pointers, but if so, not many. Step 5 go through the runtime and do the same. There shouldn't be many here as well, but I'm not sure. In a first instance, I guess the right move is to target x86 because it is fairly close to x64 so it should work with minimal changes in the runtime. You can jump in IRC if you want to talk more about the details.
Sep 10 2015
parent reply Brandon Ragland <brandon callmemaybe.com> writes:
On Friday, 11 September 2015 at 01:35:09 UTC, deadalnix wrote:
 On Friday, 11 September 2015 at 01:12:21 UTC, Brandon Ragland 
 wrote:
 [...]
Sure. First thing first, try to checkout the project and get it to build and pass the tests (well, some tests will fail, but you should get 0 regressions). Step 2 would be to modify the test runner to be able to run in 64 or 32 bits. Some tests will have a different result in 32 bits, notably the ones that use the pointer size somewhere. (tests/runner.d) Step 3 add a m32/m64 flags to SDC. It is using the getopt from phobos and that should be fairly straightforward. (sdc/src/main.d) Step 4 go through the codegen (libd-llvm) and update it to take the flag into account. (that's the big chunk). There may be some places in the frontend that assume 64 bits pointers, but if so, not many. Step 5 go through the runtime and do the same. There shouldn't be many here as well, but I'm not sure. In a first instance, I guess the right move is to target x86 because it is fairly close to x64 so it should work with minimal changes in the runtime. You can jump in IRC if you want to talk more about the details.
x86 would be easiest to target. I've checked out the repo, built it so far, and indeed some failures but no big deals. Currently paging through to get a hold on what's in there. (I'll be the first to admit I don't know squat about the LLVM compiler).
Sep 12 2015
parent deadalnix <deadalnix gmail.com> writes:
On Sunday, 13 September 2015 at 01:17:17 UTC, Brandon Ragland 
wrote:
 x86 would be easiest to target.

 I've checked out the repo, built it so far, and indeed some 
 failures but no big deals.

 Currently paging through to get a hold on what's in there. 
 (I'll be the first to admit I don't know squat about the LLVM 
 compiler).
A good place to start is : http://llvm.org/docs/LangRef.html You can uncomment things here : https://github.com/SDC-Developers/SDC/blob/master/libd-llvm/src/d/llvm/backend.d#L115 and see what kind of IR is outputed. Frankly you don't need to know much more than this to get started. Don't go paralyzed because you don't know everything. Start doing something and see what is actually blocking you.
Sep 12 2015
prev sibling next sibling parent reply BBasile <bb.temp gmx.com> writes:
On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.

 I can provide support, but I just don't have the bandwidth to 
 pull it by myself. If someone could step up, that'd be great.
Do you think that libd is 32bit ready ? https://github.com/SDC-Developers/SDC/pull/141
Sep 12 2015
parent reply deadalnix <deadalnix gmail.com> writes:
On Sunday, 13 September 2015 at 02:19:27 UTC, BBasile wrote:
 On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.

 I can provide support, but I just don't have the bandwidth to 
 pull it by myself. If someone could step up, that'd be great.
Do you think that libd is 32bit ready ? https://github.com/SDC-Developers/SDC/pull/141
Building on 32 bits and generating 32 bit code are 2 different things. No I don't think libd can compile on a 32 bits system ATM, but I do not expect it to be that far away from being able to do so.
Sep 12 2015
parent reply BBasile <bb.temp gmx.com> writes:
On Sunday, 13 September 2015 at 05:53:27 UTC, deadalnix wrote:
 On Sunday, 13 September 2015 at 02:19:27 UTC, BBasile wrote:
 On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix 
 wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.

 I can provide support, but I just don't have the bandwidth to 
 pull it by myself. If someone could step up, that'd be great.
Do you think that libd is 32bit ready ? https://github.com/SDC-Developers/SDC/pull/141
Building on 32 bits and generating 32 bit code are 2 different things. No I don't think libd can compile on a 32 bits system ATM, but I do not expect it to be that far away from being able to do so.
That's a pitty. libd itself could be usefull to program some tools for the language. I particularly think to IDE stuff like symbol list, module name finder, etc. So far in Coedit I use libdparse but if libd would be available for the 32 bit plateforms I won't be against using it.
Sep 13 2015
parent reply deadalnix <deadalnix gmail.com> writes:
On Sunday, 13 September 2015 at 13:26:05 UTC, BBasile wrote:
 On Sunday, 13 September 2015 at 05:53:27 UTC, deadalnix wrote:
 On Sunday, 13 September 2015 at 02:19:27 UTC, BBasile wrote:
 On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix 
 wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.

 I can provide support, but I just don't have the bandwidth 
 to pull it by myself. If someone could step up, that'd be 
 great.
Do you think that libd is 32bit ready ? https://github.com/SDC-Developers/SDC/pull/141
Building on 32 bits and generating 32 bit code are 2 different things. No I don't think libd can compile on a 32 bits system ATM, but I do not expect it to be that far away from being able to do so.
That's a pitty. libd itself could be usefull to program some tools for the language. I particularly think to IDE stuff like symbol list, module name finder, etc. So far in Coedit I use libdparse but if libd would be available for the 32 bit plateforms I won't be against using it.
That's a pitty that everybody ask for it, but nobody makes it happens, expecting it to magically fall from the sky.
Sep 13 2015
next sibling parent dnewbie <run3 myopera.com> writes:
On Sunday, 13 September 2015 at 19:49:58 UTC, deadalnix wrote:
 That's a pitty. libd itself could be usefull to program some 
 tools for the language. I particularly think to IDE stuff like 
 symbol list, module name finder, etc. So far in Coedit I use 
 libdparse but if libd would be available for the 32 bit 
 plateforms I won't be against using it.
That's a pitty that everybody ask for it, but nobody makes it happens, expecting it to magically fall from the sky.
WTF?
Sep 13 2015
prev sibling parent reply BBasile <bb.temp gmx.com> writes:
On Sunday, 13 September 2015 at 19:49:58 UTC, deadalnix wrote:
 On Sunday, 13 September 2015 at 13:26:05 UTC, BBasile wrote:
 On Sunday, 13 September 2015 at 05:53:27 UTC, deadalnix wrote:
 On Sunday, 13 September 2015 at 02:19:27 UTC, BBasile wrote:
 On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix 
 wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These 
 are valuable targets IMO.

 I can provide support, but I just don't have the bandwidth 
 to pull it by myself. If someone could step up, that'd be 
 great.
Do you think that libd is 32bit ready ? https://github.com/SDC-Developers/SDC/pull/141
Building on 32 bits and generating 32 bit code are 2 different things. No I don't think libd can compile on a 32 bits system ATM, but I do not expect it to be that far away from being able to do so.
That's a pitty. libd itself could be usefull to program some tools for the language. I particularly think to IDE stuff like symbol list, module name finder, etc. So far in Coedit I use libdparse but if libd would be available for the 32 bit plateforms I won't be against using it.
That's a pitty that everybody ask for it, but nobody makes it happens, expecting it to magically fall from the sky.
Ce qui est vraiment dommage c'est de faire du code qui ne compile que si la taille du pointer est 2^64. Faire du code D qui n'est pas portable relève vraiment de la connerie. Il faut vraiement soit le vouloir ou alors avoir de la merde dans les yeux pour ne pas voir les imcompatibilités qui relèves de la taille d'un registre. Ensuite quand on ignore une PR qui fixe justement ces abérations...que dire. Tu arrives encore à porter des boots ? au niveau des chevilles enflées ca passe encore ?
Oct 02 2015
next sibling parent deadalnix <deadalnix gmail.com> writes:
On Friday, 2 October 2015 at 22:35:51 UTC, BBasile wrote:
 Ce qui est vraiment dommage c'est de faire du code qui ne 
 compile que si la taille du pointer est 2^64. Faire du code D 
 qui n'est pas portable relève vraiment de la connerie. Il faut 
 vraiement soit le vouloir ou alors avoir de la merde dans les 
 yeux pour ne pas voir les imcompatibilités qui relèves de la 
 taille d'un registre.

 Ensuite quand on ignore une PR qui fixe justement ces 
 abérations...que dire.
 Tu arrives encore à porter des boots ? au niveau des chevilles 
 enflées ca passe encore ?
I see you are a specialist on the matter. Eagerly waiting for your PR.
Oct 02 2015
prev sibling next sibling parent deadalnix <deadalnix gmail.com> writes:
Ok I see there is that : 
https://github.com/SDC-Developers/SDC/pull/141

You closed the PR, so I'm not ignoring it. The author of the 
other PR disappeared in the wild, so there it is.

I you wish to resubmit your PR it will be considered seriously.
Oct 02 2015
prev sibling parent reply ponce <contact gam3sfrommars.fr> writes:
On Friday, 2 October 2015 at 22:35:51 UTC, BBasile wrote:
 Tu arrives encore à porter des boots ? au niveau des chevilles 
 enflées ca passe encore ?
Keep it civil please.
Oct 03 2015
parent reply deadalnix <deadalnix gmail.com> writes:
On Saturday, 3 October 2015 at 09:44:06 UTC, ponce wrote:
 On Friday, 2 October 2015 at 22:35:51 UTC, BBasile wrote:
 Tu arrives encore à porter des boots ? au niveau des chevilles 
 enflées ca passe encore ?
Keep it civil please.
He knows, that's why he wrote in french. We'll know if he is serious about it if he reopens and rebase his PR.
Oct 03 2015
parent reply matovitch <camille.brugel laposte.net> writes:
On Saturday, 3 October 2015 at 18:51:56 UTC, deadalnix wrote:
 On Saturday, 3 October 2015 at 09:44:06 UTC, ponce wrote:
 On Friday, 2 October 2015 at 22:35:51 UTC, BBasile wrote:
 Tu arrives encore à porter des boots ? au niveau des 
 chevilles enflées ca passe encore ?
Keep it civil please.
He knows, that's why he wrote in french. We'll know if he is serious about it if he reopens and rebase his PR.
Vu que ca parle francais, je vais pas me gener. ;) Ca sera pas pour t'insulter en echappant a la censure mais pas pour ajouter quelque chose de productif non plus. Je n'ai vraiment pas le temps de participer a un projet comme SDC mais j'ai largement le temps de te remercier pour le boulot que ca represente. J'avais regarde ta pres a la dconf 2014, l'idee de processer les noeuds de maniere asynchrone c'est juste genial (n.b. : je suis sur que tu fais gaffe aux chevilles). Keep it up ! p.s.: Il me semble que t' avais besoin d'une hashmap pour le runtime. J'ai recement code une hashtable en C++ utilisant une des meilleures technique d'open adressing (Robinhood hashing) bcp plus rapide que les hashmap de boost ou gcc (3x plus rapide en O3) tout en ayant un load factor raisonnable. Ici : https://github.com/matovitch/RobinHoodHashtable/blob/master/Rob nHoodHashtable.hpp. En esperant que ca puisse t' aider.
Oct 04 2015
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 10/4/15 7:37 PM, matovitch wrote:
 On Saturday, 3 October 2015 at 18:51:56 UTC, deadalnix wrote:
 On Saturday, 3 October 2015 at 09:44:06 UTC, ponce wrote:
 On Friday, 2 October 2015 at 22:35:51 UTC, BBasile wrote:
 Tu arrives encore à porter des boots ? au niveau des chevilles
 enflées ca passe encore ?
Keep it civil please.
He knows, that's why he wrote in french. We'll know if he is serious about it if he reopens and rebase his PR.
Vu que ca parle francais, je vais pas me gener. ;) Ca sera pas pour t'insulter en echappant a la censure mais pas pour ajouter quelque chose de productif non plus. Je n'ai vraiment pas le temps de participer a un projet comme SDC mais j'ai largement le temps de te remercier pour le boulot que ca represente. J'avais regarde ta pres a la dconf 2014, l'idee de processer les noeuds de maniere asynchrone c'est juste genial (n.b. : je suis sur que tu fais gaffe aux chevilles). Keep it up ! p.s.: Il me semble que t' avais besoin d'une hashmap pour le runtime. J'ai recement code une hashtable en C++ utilisant une des meilleures technique d'open adressing (Robinhood hashing) bcp plus rapide que les hashmap de boost ou gcc (3x plus rapide en O3) tout en ayant un load factor raisonnable. Ici : https://github.com/matovitch/RobinHoodHashtable/blob/master/RobinHoodHashtable.hpp. En esperant que ca puisse t' aider.
Veuillez ecrire ici en anglais s'il vous plait. -- Andrei
Oct 04 2015
parent deadalnix <deadalnix gmail.com> writes:
On Monday, 5 October 2015 at 06:28:32 UTC, Andrei Alexandrescu 
wrote:
 Veuillez ecrire ici en anglais s'il vous plait. -- Andrei
Look at that ! You are doing just fine :)
Oct 04 2015
prev sibling parent deadalnix <deadalnix gmail.com> writes:
On Sunday, 4 October 2015 at 17:37:55 UTC, matovitch wrote:
 On Saturday, 3 October 2015 at 18:51:56 UTC, deadalnix wrote:
 On Saturday, 3 October 2015 at 09:44:06 UTC, ponce wrote:
 On Friday, 2 October 2015 at 22:35:51 UTC, BBasile wrote:
 Tu arrives encore à porter des boots ? au niveau des 
 chevilles enflées ca passe encore ?
Keep it civil please.
He knows, that's why he wrote in french. We'll know if he is serious about it if he reopens and rebase his PR.
Vu que ca parle francais, je vais pas me gener. ;) Ca sera pas pour t'insulter en echappant a la censure mais pas pour ajouter quelque chose de productif non plus. Je n'ai vraiment pas le temps de participer a un projet comme SDC mais j'ai largement le temps de te remercier pour le boulot que ca represente. J'avais regarde ta pres a la dconf 2014, l'idee de processer les noeuds de maniere asynchrone c'est juste genial (n.b. : je suis sur que tu fais gaffe aux chevilles). Keep it up ! p.s.: Il me semble que t' avais besoin d'une hashmap pour le runtime. J'ai recement code une hashtable en C++ utilisant une des meilleures technique d'open adressing (Robinhood hashing) bcp plus rapide que les hashmap de boost ou gcc (3x plus rapide en O3) tout en ayant un load factor raisonnable. Ici : https://github.com/matovitch/RobinHoodHashtable/blob/master/Rob nHoodHashtable.hpp. En esperant que ca puisse t' aider.
Thanks. I've been looking in robin hood hashing for a while and made an half assed implementation of it for the GC, but having something more solid would not hurt.
Oct 04 2015
prev sibling next sibling parent reply Suliman <evermind live.ru> writes:
On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.
What is the current status of the project? What need to implement since it's become self-compiling, oтв would be able to compile simple D Apps.
Oct 01 2015
parent reply deadalnix <deadalnix gmail.com> writes:
On Thursday, 1 October 2015 at 14:56:22 UTC, Suliman wrote:
 On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.
What is the current status of the project? What need to implement since it's become self-compiling, oтв would be able to compile simple D Apps.
If you look at the runtime, that will give you an idea of the kind of code it can compile. It can compile a descent subset of D, but most code won't compile, mostly because phobos makes use of all the feature imaginable in the language :) It also have many rough edges. I would not recommend to use it for anything other than messing around to see what it can do at this stage. Right now, I'm focusing on the GC. This may not seem like the with SDC so far: tackle difficult problem first, as these are the one more likely to impact the overall design of the thing.
Oct 01 2015
parent reply rsw0x <anonymous anonymous.com> writes:
On Thursday, 1 October 2015 at 18:12:50 UTC, deadalnix wrote:
 Right now, I'm focusing on the GC. This may not seem like the 

 with SDC so far: tackle difficult problem first, as these are 
 the one more likely to impact the overall design of the thing.
I contacted you on twitter about D's GC design a month or two ago - if you would like to collaborate on this feel free to send me a tweet rsw0x Bye.
Oct 01 2015
parent deadalnix <deadalnix gmail.com> writes:
On Friday, 2 October 2015 at 03:40:39 UTC, rsw0x wrote:
 On Thursday, 1 October 2015 at 18:12:50 UTC, deadalnix wrote:
 Right now, I'm focusing on the GC. This may not seem like the 

 taken with SDC so far: tackle difficult problem first, as 
 these are the one more likely to impact the overall design of 
 the thing.
I contacted you on twitter about D's GC design a month or two ago - if you would like to collaborate on this feel free to send me a tweet rsw0x Bye.
Well at this stage, the plan is pretty much down. At this stage, GC allocation, explicit free and collection for thread local heap. The next big step is to have some heuristic to trigger the collection when appropriate.
Oct 02 2015
prev sibling parent Suliman <evermind live.ru> writes:
On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote:
 All is in the title.

 ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are 
 valuable targets IMO.

 I can provide support, but I just don't have the bandwidth to 
 pull it by myself. If someone could step up, that'd be great.
What need to get SDC able to build them-self and build simple hello-world apps? Is it's a lot of job stay for it?
Oct 04 2015