[LLVMdev] another problem with function arguments aligment

Lauro Ramos Venancio lauro.venancio at gmail.com
Mon Feb 26 06:41:51 PST 2007

The ARM EABI (AAPCS) defines:
- i64 values are 8-bytes aligned
- "The alignment of an aggregate shall be the alignment of its
most-aligned component."


struct ss {
  int x;
  int y;

void f(int a, struct ss b);
r0 <- a
r1-r2 <- b

void g(int a, long long b);
r0 <- a
r2-r3 <- b

The problem is: llvm-gcc generates the same bytecode for both functions:

declare void @f(i32, i64)
declare void @g(i32, i64)

I can't differ an i64 argument from a struct argument.


More information about the llvm-dev mailing list