Android/ARM codegen

Joakim via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Jul 17 05:26:30 PDT 2015


On Friday, 17 July 2015 at 08:58:30 UTC, Dan Olson wrote:
> "Joakim" <dlang at joakim.fea.st> writes:
>
>> Alright, I've been stepping through some failing tests: one 
>> that seems to be bad codegen is that many calls to 
>> std.algorithm.iteration.map seem to fail, for example, when 
>> running the tests for std.zip.  One of the std.zip tests calls 
>> std.random.uniform, which then gets its second parameter 
>> stomped by map from rndGen().
>
> Joakim, I have a hunch.  Can you try changing your 
> abi-android.cpp so passByVal() returns false always?  That is 
> the only difference in our generated IR and in my experience 
> byval causes incorrect code on ARM.
>
> As an experiment, I changed my passByVal() back to return true 
> for Tstruct (the LDC default), and then my IR is identical to 
> yours and my ARM code, though slightly different, also is 
> clobbering a saved reg on the stack.

Yep, that fixed it, std.zip passes its tests now. :) I'll run the 
rest of the tests and report back, thanks for your help.


More information about the digitalmars-d-ldc mailing list