diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-10 08:03:20 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-10 19:25:59 +0000 |
commit | 55f0d811e4aeba74842c8a86e02889ae3e86c994 (patch) | |
tree | 1031b88feea8826467e986e3a2be9a1088e47aad /src/panfrost/bifrost | |
parent | acab788578cd1ccd67b042798786a39394ad5f03 (diff) |
pan/bi: Add isub op
Can't be a regular ADD since there's no negate modifier for integers
(it's a different opcode entirely).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
Diffstat (limited to 'src/panfrost/bifrost')
-rw-r--r-- | src/panfrost/bifrost/bi_print.c | 1 | ||||
-rw-r--r-- | src/panfrost/bifrost/bi_tables.c | 1 | ||||
-rw-r--r-- | src/panfrost/bifrost/bifrost_compile.c | 2 | ||||
-rw-r--r-- | src/panfrost/bifrost/compiler.h | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index daccf91a98f..06b4a034cfc 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -120,6 +120,7 @@ bi_class_name(enum bi_class cl) case BI_DISCARD: return "discard"; case BI_FMA: return "fma"; case BI_FREXP: return "frexp"; + case BI_ISUB: return "isub"; case BI_LOAD: return "load"; case BI_LOAD_UNIFORM: return "load_uniform"; case BI_LOAD_ATTR: return "load_attr"; diff --git a/src/panfrost/bifrost/bi_tables.c b/src/panfrost/bifrost/bi_tables.c index 06430d0912b..e33b89aae55 100644 --- a/src/panfrost/bifrost/bi_tables.c +++ b/src/panfrost/bifrost/bi_tables.c @@ -38,6 +38,7 @@ unsigned bi_class_props[BI_NUM_CLASSES] = { [BI_DISCARD] = BI_SCHED_HI_LATENCY, [BI_FMA] = BI_ROUNDMODE | BI_SCHED_FMA, [BI_FREXP] = BI_SCHED_ALL, + [BI_ISUB] = BI_GENERIC | BI_SCHED_ALL, [BI_LOAD] = BI_SCHED_HI_LATENCY, [BI_LOAD_UNIFORM] = BI_SCHED_HI_LATENCY, [BI_LOAD_ATTR] = BI_SCHED_HI_LATENCY, diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 6fa982e50f4..97ef06946ac 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -233,6 +233,8 @@ bi_class_for_nir_alu(nir_op op) case nir_op_fadd: case nir_op_fsub: return BI_ADD; + case nir_op_isub: + return BI_ISUB; case nir_op_i2i8: case nir_op_i2i16: diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index c1c8d695be3..ec1a6f3768c 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -58,6 +58,7 @@ enum bi_class { BI_DISCARD, BI_FMA, BI_FREXP, + BI_ISUB, BI_LOAD, BI_LOAD_UNIFORM, BI_LOAD_ATTR, |