r600/sb: fix boundary assert for mem-instruction decoding

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563>
This commit is contained in:
Gert Wollny
2021-01-18 17:09:07 +01:00
committed by Marge Bot
parent 14fe19e797
commit c1785c55f7
@@ -540,7 +540,8 @@ int bc_decoder::decode_fetch_mem(unsigned & i, bc_fetch& bc) {
uint32_t dw2 = dw[i+2];
i += 4; // MEM instructions align to 4 words boundaries
assert(i < ndw);
assert(i <= ndw);
MEM_RD_WORD0_R7EGCM w0(dw0);
bc.elem_size = w0.get_ELEM_SIZE();