mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
panvk: implement cs_extract64 & cs_extract_tuple
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34733>
This commit is contained in:
parent
5984ca8417
commit
8a35a98936
1 changed files with 19 additions and 0 deletions
|
|
@ -492,6 +492,25 @@ cs_extract32(struct cs_builder *b, struct cs_index idx, unsigned word)
|
|||
return cs_reg32(b, idx.reg + word);
|
||||
}
|
||||
|
||||
static inline struct cs_index
|
||||
cs_extract64(struct cs_builder *b, struct cs_index idx, unsigned word)
|
||||
{
|
||||
assert(idx.type == CS_INDEX_REGISTER && "unsupported");
|
||||
assert(word + 1 < idx.size && "overrun");
|
||||
|
||||
return cs_reg64(b, idx.reg + word);
|
||||
}
|
||||
|
||||
static inline struct cs_index
|
||||
cs_extract_tuple(struct cs_builder *b, struct cs_index idx, unsigned word,
|
||||
unsigned size)
|
||||
{
|
||||
assert(idx.type == CS_INDEX_REGISTER && "unsupported");
|
||||
assert(word + size < idx.size && "overrun");
|
||||
|
||||
return cs_reg_tuple(b, idx.reg + word, size);
|
||||
}
|
||||
|
||||
static inline struct cs_block *
|
||||
cs_cur_block(struct cs_builder *b)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue