DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
- We define a new block type of "endianessSwitch" ... this can either take a constant "LE" or "BE" (Or the long form, which might be more explicit) ... or an expression which evaluates to one of the two.
- We add the BE/LE flag to type definitions (explicitly no dynamic hereBut a reduced form, which explicitly doesn't support dynamic endianess)
Now to my reasoning:
Usually, it will not only be one field that needs to be switched, so adding a flag to the fields would require duplicating a lot of the flagging-code to the mspec documents. Using a block of equally endianed fields simplifies things. And in addition to that it explicitly focusses on the detail of setting the endianess, which should simplify implementing this in the code-generation ... as a endianessSwitch simply gets converted into an allmost constant try-finally block.
...