mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
panfrost/midgard: Add ilzcnt op
Used for implementing findLSB/MSB Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
2e7555b14b
commit
6cba9acb75
2 changed files with 3 additions and 0 deletions
|
|
@ -253,6 +253,7 @@ static unsigned alu_opcode_props[256] = {
|
|||
[midgard_alu_op_iand] = UNITS_ADD, /* XXX: Test case where it's right on smul but not sadd */
|
||||
[midgard_alu_op_ior] = UNITS_ADD,
|
||||
[midgard_alu_op_ixor] = UNITS_ADD,
|
||||
[midgard_alu_op_ilzcnt] = UNITS_ADD,
|
||||
[midgard_alu_op_inot] = UNITS_MOST,
|
||||
[midgard_alu_op_ishl] = UNITS_ADD,
|
||||
[midgard_alu_op_iasr] = UNITS_ADD,
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ typedef enum {
|
|||
midgard_alu_op_inot = 0x72,
|
||||
midgard_alu_op_iandnot = 0x74, /* (a, b) -> a & ~b, used for not/b2f */
|
||||
midgard_alu_op_ixor = 0x76,
|
||||
midgard_alu_op_ilzcnt = 0x78, /* Number of zeroes on left. 31 - ilzcnt(x) = findMSB(x) */
|
||||
midgard_alu_op_imov = 0x7B,
|
||||
midgard_alu_op_iabs = 0x7C,
|
||||
midgard_alu_op_feq = 0x80,
|
||||
|
|
@ -499,6 +500,7 @@ static char *alu_opcode_names[256] = {
|
|||
[midgard_alu_op_inot] = "inot",
|
||||
[midgard_alu_op_iandnot] = "iandnot",
|
||||
[midgard_alu_op_ixor] = "ixor",
|
||||
[midgard_alu_op_ilzcnt] = "ilzcnt",
|
||||
[midgard_alu_op_feq] = "feq",
|
||||
[midgard_alu_op_fne] = "fne",
|
||||
[midgard_alu_op_flt] = "flt",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue