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.

Reply via email to