Preliminary struct and union support.
Working features:
- struct
- union
- nested structs
- anonymous structs
- forward declarations
- '.' and '->'
- copying structs using '='
Missing features:
- passing structs by value
- returning structs by value
- typedef
- sizeof
Example:
struct v {float x, y, z, w; };
void add(struct v* result, struct v* a, struct v* b) {
result->x = a->x + b->x;
result->y = a->y + b->y;
result->z = a->z + b->z;
result->w = a->w + b->w;
}
Reworked size-of and alignment logic to support structs.
Improved encoding of ARM immediate constants.
3 files changed