summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opcodes.py
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-03-20 13:06:23 +1100
committerTimothy Arceri <[email protected]>2018-03-22 12:42:34 +1100
commitcca214174549af3d608e252d8642c2e194c910ed (patch)
tree9aebe7e0430bb309ac88a89ad668d82b5d447cd6 /src/compiler/nir/nir_opcodes.py
parent12c22b897af1e015cf76b1cfee9e456a0e671f38 (diff)
nir: add frexp_exp and frexp_sig opcodes
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opcodes.py')
-rw-r--r--src/compiler/nir/nir_opcodes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index 65d13200624..04edffc6c0b 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -214,6 +214,9 @@ unop("fquantize2f16", tfloat, "(fabs(src0) < ldexpf(1.0, -14)) ? copysignf(0.0f,
unop("fsin", tfloat, "bit_size == 64 ? sin(src0) : sinf(src0)")
unop("fcos", tfloat, "bit_size == 64 ? cos(src0) : cosf(src0)")
+# dfrexp
+unop_convert("frexp_exp", tint32, tfloat64, "frexp(src0, &dst);")
+unop_convert("frexp_sig", tfloat64, tfloat64, "int n; dst = frexp(src0, &n);")
# Partial derivatives.