}
}
- floatDeclaration = new FloatDeclaration(exponent, mantissa, byteOrder, encoding);
+ floatDeclaration = new FloatDeclaration(exponent, mantissa, byteOrder, encoding, alignment);
assert (floatDeclaration != null);
return floatDeclaration;
}
integerDeclaration = new IntegerDeclaration((int) size, signed, base,
- byteOrder, encoding, clock);
+ byteOrder, encoding, clock, alignment);
assert (integerDeclaration != null);
return integerDeclaration;
/* Parse the body */
parseStructBody(structBody, structDeclaration);
+ long maxFieldAlign = -1;
+ for( IDeclaration field : structDeclaration.getFields().values())
+ {
+ maxFieldAlign = Math.max(maxFieldAlign, field.getAlignment());
+ }
+ structDeclaration.setMinAlign(maxFieldAlign);
/* If struct has name, add it to the current scope. */
if (hasName) {