Syntax of format field access, encode and predicate functions #281
Replies: 4 comments 12 replies
-
|
I think the new syntax is fine. I am not a fan of the alternative since I work regularly with formats and operands and don't understand it on first sight. I see also no point in allowing inheritance. |
Beta Was this translation helpful? Give feedback.
-
|
@AndreasKrall for predicates, is it allowed to have other access functions on the rhs than the access function itself? E.g. |
Beta Was this translation helpful? Give feedback.
-
|
@AndreasKrall @kper is the following check valid: E.g. Where the first encoding has the same target as the second one and operates on a subset of field accesses. This would raise the following error |
Beta Was this translation helpful? Give feedback.
-
|
I am currently in the processing of implementing this and I want to document a few problems a meeting. The concept of field access functions fits nicely into LLVM when we have 1:1 relationship between field and field access function. However, it seems that it doesn't fit so properly anymore when a field gets encoded by multiple field access functions. Consider the following example We have two field access functions |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We are not happy with the current syntax of the format field access (decode), encode and predicate functions. Eventually there is also the need for additionally
assemblyencode and predicate functions:In the OpenVADL AArch64 specification there are currently only the access functions defined (and we are all happy with the syntax for the access functions:
I personally do not like the encode and predicate section, I would prefer just the (different) operators as currently used, e.g.:
Currently we can define the encoding of
immsandimmrseparately, in the future it could be that more powerful solutions are required. We have the above presented case where we want to map two format fields to two immediate values and in the inverse case mapping 2 immediate values to 2 format fields.The encoding and predicate is always connected to the decode, should we specify it like:
The implementation could be done using bit vector concatenation on the right side and bit vector splitting on the left side.
Another weird example is the imm13 example where with 2 different decode functions in 2 different instructions either a 32 bit or a 64 bit value is needed, but for macro simplification it would be easier if the name of the value is the same. It is also the case here in some way as left / right should have a predicate either on the range 0..31 or 0..63.
It is not always clear, if the type of the predicate arguments is the same as the type of the access function result.
In the discussion there have been proposals like:
A further already discussed extension is format inheritance where I currently see no need:
Beta Was this translation helpful? Give feedback.
All reactions