flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > fasm1:struct macro additions & bugfixies |
Author |
|
ProMiNick 18 Feb 2019, 21:07
List of + additions and - bugfixies from original struct macro:
+ Top level union definition + struct is architecture independent now - subunions now accept only 1 argument the only that stored in subunion (what additions are missed: 1) support of empty body for struct-ends & union-ends blocks - may be it havn`t practical case; 2) support of alignment & natural alignment of fields (MS structs almost all); 3) support of prestruct forced alignment (some structs that expect VEX processing instructions over them); 4) support of padding; 5) arrays; 6) sequences with varsize elements - may be 5 & 6 unrealizable in common case) bug remain unfixed: parameters that goes to struct are cover all struct fields even unnamed ones (examples of structs (included with fasm) - builded in special form to avoid that weakness) globalsymbols used for struct processing: datadef@directives - architecture dependant list of data definition directives datarsv@directives - architecture dependant list of data reservation directives @struct - marker that we are in struct when it empty @union - marker that we are in struct (top level union) when it empty sub@struct - marker holding type of substruct that we are in or empty otherwise last@union - used only within define@union & define@subunion macros outer of them holds garbage main macros for struct processing: struct - for struct definition union - for union definition ends - encapsulated in struct - finalize struct|union and their subs definitions helper macros for struct processing: struct@overridedefs, struct@overridersvs, struct@restoredefs - for overriding & restoring action of data definition & reserving directives make@struct - determine type of define@ prefixed macro and needance of substructure processing for every field enable@substruct(and make@substruct in it) - for substructure processing define@ prefixed macros - defines same name struc & macro for union or struct accordingly to postfix (same for subs). 2 more globalsymbols I missed: field@struct - if some macro expects to be processed within struct-ends or union-ends block it should define that symbol, outer of such blocks that symbol holds garbage fields@... (instead of ... the name of structure) - used internaly in struct-ends or union-ends block, outer of that blocks remain hold a value with list of field-type-def sequences for that structure now I can back to https://board.flatassembler.net/topic.php?t=20945 with clear Совѣсть. Last edited by ProMiNick on 19 Feb 2019, 09:47; edited 2 times in total |
|||
18 Feb 2019, 21:07 |
|
ProMiNick 19 Feb 2019, 09:06
Tomasz, I`m not sure only in one place - last row of macro define@union:
Code: match no, @struct \\{ ..anonymous name value \\} \} } ;value or <value> should value be enclosed in <> or <> could be omitted? |
|||
19 Feb 2019, 09:06 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.