Minres / CoreDSL

Xtext project to parse CoreDSL files
Apache License 2.0
16 stars 3 forks source link

Add a sizeof(encoding) operator #56

Closed wysiwyng closed 1 year ago

wysiwyng commented 2 years ago

This should return the encoding length of the current instruction. Useful e.g. in functions that need to calculate the next PC value.

jopperm commented 2 years ago

Related: #15

jopperm commented 2 years ago

Also related: #54

AtomCrafty commented 2 years ago

Also also related: #68

eyck commented 1 year ago

This shall be implemented as a dedicated intrinsic like __encoding_size()

jopperm commented 1 year ago

The frontend supports __encoding_size; I'll leave this issue open to track documenting it in the spec.

jopperm commented 1 year ago

I'm proposing this: diff

@AtomCrafty does #91 already handle the usage inside always?

AtomCrafty commented 1 year ago

No, this is the first time I see that mentioned. Shouldn't be too difficult to implement though.