Runtime for ARM
Paolo Invernizzi
pinver at pinver.com
Tue May 14 20:30:10 PDT 2013
On Saturday, 16 February 2013 at 23:35:58 UTC, Kai Nacke wrote:
> On Saturday, 16 February 2013 at 18:38:49 UTC, Paolo Invernizzi
> wrote:
> Hi Paolo!
>
> Just an assumption: You need to write an ABI class for ARM.
> HandleByVal is called during argument lowering in LLVM. The
> comment of this function says:
>
> /// HandleByVal - Every parameter *after* a byval parameter is
> passed
> /// on the stack. Remember the next parameter register to
> allocate,
> /// and then confiscate the rest of the parameter registers to
> insure
> /// this.
>
> I can imagine that there is something wrong with the calling
> convention in LDC. You should look at gen/abi-x86.cpp and
> gen/abi-x86-64.cpp to get a feeling what you need to do. Then
> write an abi-arm which models the ARM calling convention. It is
> really easy if you have an understanding of the used calling
> convention.
>
> But remember: this is only a shot in the dark from me. I never
> got that far on my ARM box...
>
> Regards
> Kai
Hi Kay,
Thanks for the tip, I'm really an ARM newbie, but I'll give a
look to gen/abi and I'll try to find out something about the ARM
calling convention...
Right now I've reduced the ice to something like:
template Rebindable(T) {
struct Rebindable {
void opAssign(Rebindable ) {}
}
}
struct SysTime {
Rebindable!(TimeZone) _timezone;
}
class TimeZone {}
ice with ldc2 -c ice.d -march=arm -mcpu=cortex-a9
-mtriple=arm-linux-gnueabihf
Cheers,
Paolo
More information about the digitalmars-d-ldc
mailing list