panfrost/midgard: Fix crash on unknown op
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
@@ -264,6 +264,10 @@ static struct {
|
||||
static bool
|
||||
midgard_is_integer_op(int op)
|
||||
{
|
||||
char prefix = alu_opcode_props[op].name[0];
|
||||
return (prefix == 'i') || (prefix == 'u');
|
||||
const char *name = alu_opcode_props[op].name;
|
||||
|
||||
if (!name)
|
||||
return false;
|
||||
|
||||
return (name[0] == 'i') || (name[0] == 'u');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user