Adding BYTE operators visit functions in inlinefcall
authorlaurent
Wed, 13 Jul 2011 13:57:29 +0200
changeset 346 620fd98a021d
parent 345 894c0e6d951c
child 347 44ff2a6fcadc
child 355 30db860bd3bd
Adding BYTE operators visit functions in inlinefcall
stage4/generate_c/generate_c_inlinefcall.cc
--- a/stage4/generate_c/generate_c_inlinefcall.cc	Wed Jul 13 13:40:14 2011 +0200
+++ b/stage4/generate_c/generate_c_inlinefcall.cc	Wed Jul 13 13:57:29 2011 +0200
@@ -770,6 +770,60 @@
       return NULL;
     }
 
+    void *visit(AND_operator_c *symbol)	{
+      if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
+          search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
+    	BYTE_operator_result_type();
+      }
+      else {ERROR;}
+      return NULL;
+    }
+
+    void *visit(OR_operator_c *symbol)	{
+      if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
+          search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
+    	BYTE_operator_result_type();
+      }
+      else {ERROR;}
+      return NULL;
+    }
+
+    void *visit(XOR_operator_c *symbol)	{
+      if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
+          search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
+    	BYTE_operator_result_type();
+      }
+      else {ERROR;}
+      return NULL;
+    }
+
+    void *visit(ANDN_operator_c *symbol)	{
+      if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
+          search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
+    	BYTE_operator_result_type();
+      }
+      else {ERROR;}
+      return NULL;
+    }
+
+    void *visit(ORN_operator_c *symbol)	{
+      if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
+          search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
+    	BYTE_operator_result_type();
+      }
+      else {ERROR;}
+      return NULL;
+    }
+
+    void *visit(XORN_operator_c *symbol)	{
+      if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
+          search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
+    	BYTE_operator_result_type();
+      }
+      else {ERROR;}
+      return NULL;
+    }
+
     void *visit(ADD_operator_c *symbol)	{
       if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
           search_expression_type->is_time_type(this->current_operand_type)) {