[LLVMdev] problem with function arguments in ARM EABI

Lauro Ramos Venancio lauro.venancio at gmail.com
Thu Feb 8 10:46:44 PST 2007


I'm facing a problem with functions arguments. ARM EABI defines that
8-bytes arguments must be 8-bytes aligned. For example:

void @f(i32 %a, i64 %b)

ARM EABI:
r0 <- %a
r2,r3 <- %b

Darwin:
r0 <- %a
r1,r2 <- %b

void @g(i32 %a, i32 %b, i32 %c)

ARM EABI or Darwin:
r0 <- %a
r1 <- %b
r2 <- %c

The problem is: I can't differ a i64 argument of two i32 arguments in
ISD::CALL (ARM doesn't have i64 registers). The function
TargetLowering::LowerCallTo transforms all i64 arguments in two i32
arguments.

A possible solution is override TargetLowering::LowerCallTo and do not
expand i64 arguments. I don't know if it's a good solution. None
backend overrides this function.

Any ideas?

Lauro



More information about the llvm-dev mailing list