freedreno/isa: add store_instruction(..)
Makes it possible to store an encoded instruction in a generic ISA specific way. 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>
This commit is contained in:
parent
a5bbd08775
commit
a6b82d1c8c
|
@ -358,6 +358,14 @@ uint64_t_to_bitmask(uint64_t val)
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
store_instruction(BITSET_WORD *dst, bitmask_t instr)
|
||||||
|
{
|
||||||
|
% for i in range(0, int(isa.bitsize / 32)):
|
||||||
|
*(dst + ${i}) = instr.bitset[${i}];
|
||||||
|
% endfor
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opaque type from the PoV of generated code, but allows state to be passed
|
* Opaque type from the PoV of generated code, but allows state to be passed
|
||||||
* thru to the hand written helpers used by the generated code.
|
* thru to the hand written helpers used by the generated code.
|
||||||
|
|
Loading…
Reference in New Issue