10.3.3. Non-simple value return

A non-simple type is any non-floating-point type of size greater than one word (including structures containing only floating-point fields), and certain single-word structured types.

A structure is considered integer-like if its size is less than or equal to one word, and the offset of each of its addressable subfields is zero. An integer-like structured result is considered simple and is returned in register a1.

Integer-like structures:

struct {int a:8, b:8, c:8, d:8;} union {int i; char *p;}

Non integer-like structures:

struct {char a; char b; char c; char d;}

A multi-word or non-integer-like result is returned to an address passed as an additional first argument to the function call. At the machine level:

TT tt = f(x, ...);

is implemented as:

TT tt; f(&tt, x, ...);
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential