mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
pan/cs: Allow sparse register set passed to loads/stores
When it comes to copying stuff around, it becomes handy to be able to have a discontiguous range of register to load to/store from so we don't have to move stuff around to make things contiguous in the register file. Allow that by making register count the last bit in the mask rather than counting bits. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: John Anthony <john.anthony@arm.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
This commit is contained in:
parent
1a5ce4a96e
commit
b1934057cb
1 changed files with 2 additions and 2 deletions
|
|
@ -935,7 +935,7 @@ cs_load_to(struct cs_builder *b, struct cs_index dest, struct cs_index address,
|
|||
unsigned mask, int offset)
|
||||
{
|
||||
cs_emit(b, LOAD_MULTIPLE, I) {
|
||||
I.base_register = cs_to_reg_tuple(dest, util_bitcount(mask));
|
||||
I.base_register = cs_to_reg_tuple(dest, util_last_bit(mask));
|
||||
I.address = cs_to_reg64(address);
|
||||
I.mask = mask;
|
||||
I.offset = offset;
|
||||
|
|
@ -961,7 +961,7 @@ cs_store(struct cs_builder *b, struct cs_index data, struct cs_index address,
|
|||
unsigned mask, int offset)
|
||||
{
|
||||
cs_emit(b, STORE_MULTIPLE, I) {
|
||||
I.base_register = cs_to_reg_tuple(data, util_bitcount(mask));
|
||||
I.base_register = cs_to_reg_tuple(data, util_last_bit(mask));
|
||||
I.address = cs_to_reg64(address);
|
||||
I.mask = mask;
|
||||
I.offset = offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue