Christian Gmeiner
d364d445ad
isaspec: Handle patterns bigger then 64 bit
...
Currently uint64_t_to_bitmask(..) is used in combination with
the pattern 'match'. This only works for values smaller then
64 bit. Add support for bigger isa sizes.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16996 >
2022-06-14 12:35:39 +00:00
Ilia Mirkin
b91b036322
isaspec: add gen-based leaf bitset separation
...
This is necessary for some ops which have slightly different encoding on
a4xx/a5xx, but are otherwise identical. This helps keeping the compiler
from having to worry about these details and creating separate ops.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14789 >
2022-02-12 13:46:07 -05:00
Vinson Lee
21047a4a06
isaspec: Remove duplicate return statement.
...
Fix defect reported by Coverity Scan.
Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached: return val;.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14350 >
2022-01-05 22:13:48 -08:00
Rob Clark
fac9d22773
isaspec: Add prototypes for expr evaluators
...
Add function prototypes for generated expr evaluators, to avoid a use-
before-declaration issue if an expression references a derived field.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13787 >
2021-11-16 18:44:22 +00:00
Rob Clark
e08d152d68
isaspec: Add bitfield size assertions
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13353 >
2021-10-15 15:52:33 +00:00
Rob Clark
4166635bd1
isaspec: Do not emit duplicate field encodes
...
If an <override> overrides the definition of a field, don't emit
encoding for both the override's definition and the fallback. (See
"SAMP" in #cat5-src3). It is harmless currently, because (in this
case) it will just re-encode the low bits of "SAMP". But when we
start asserting on that the field being encoded fits in the allowed
number of bits, the re-encoding of the fallback field definition
will start triggering asserts.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13353 >
2021-10-15 15:52:33 +00:00
Rob Clark
2b826582d8
isaspec: De-duplicate bitset encoding
...
bitset encoding tends to have a lot of duplication, for ex. many
instructions with the same encoding modulo the fixed pattern. Now that
encode_bitset is split out into it's own template, so that we can
capture the result, use a hash table to de-duplicate the bitset encoding
into "snippet" functions so that bitset cases with identical encoding
can re-use the same generated code.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Rob Clark
8726ed7221
isaspec: Split encode_bitset() into it's own template
...
In the next patch, we are going to want to be able to capture the result
of rendering the template as a py variable, which I don't think you can
do otherwise with a <%def>.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Rob Clark
72db4e51f3
isaspec: Fix comment
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Rob Clark
cd3ee83ca5
isaspec: Remove unused leftovers
...
These were never used, leftovers from an earlier iteration of isaspec
which used an RPN based thing for expressions.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Christian Gmeiner
bc2e806b0f
freedreno/isa: move isaspec to a new home
...
This commit moves isaspec out of freedreno into a more
generic new home - src/compiler/isaspec.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00