summaryrefslogtreecommitdiff
path: root/ir.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-05-03 20:05:57 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-05-14 16:34:46 -0700
commita4b7b5a654ca810e296bb0cca1b27b8847f5548a (patch)
tree95a2cd0825210f2e928b7c16741ed62d9ae9bc49 /ir.cpp
parentc2de1875234565c53b8f3683b04bc7f901055882 (diff)
Implement "sign" builtin via a new expression operator.
Diffstat (limited to 'ir.cpp')
-rw-r--r--ir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ir.cpp b/ir.cpp
index 76f5bab731..b927c73ccb 100644
--- a/ir.cpp
+++ b/ir.cpp
@@ -53,6 +53,7 @@ ir_expression::get_num_operands(ir_expression_operation op)
1, /* ir_unop_logic_not */
1, /* ir_unop_neg */
1, /* ir_unop_abs */
+ 1, /* ir_unop_sign */
1, /* ir_unop_rcp */
1, /* ir_unop_rsq */
1, /* ir_unop_sqrt */
@@ -112,6 +113,7 @@ static const char *const operator_strs[] = {
"!",
"neg",
"abs",
+ "sign",
"rcp",
"rsq",
"sqrt",