cris: Check UNDEFWEAK_NO_DYNAMIC_RELOC
[deliverable/binutils-gdb.git] / gdb / valarith.c
index 9724acace78b1f84e0f70c540893d190f7193c00..ede60e4b68e35bb82fce7434a5626fd69f97deff 100644 (file)
@@ -36,9 +36,6 @@
 #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2)
 #endif
 
-void _initialize_valarith (void);
-\f
-
 /* Given a pointer, return the size of its target.
    If the pointer type is void *, then return 1.
    If the target type is incomplete, then error out.
@@ -505,7 +502,7 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op,
            = TYPE_TARGET_TYPE (check_typedef (value_type (argvec[0])));
          return value_zero (return_type, VALUE_LVAL (arg1));
        }
-      return call_function_by_hand (argvec[0], 2 - static_memfuncp,
+      return call_function_by_hand (argvec[0], NULL, 2 - static_memfuncp,
                                    argvec + 1);
     }
   throw_error (NOT_FOUND_ERROR,
@@ -624,7 +621,7 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
            = TYPE_TARGET_TYPE (check_typedef (value_type (argvec[0])));
          return value_zero (return_type, VALUE_LVAL (arg1));
        }
-      return call_function_by_hand (argvec[0], nargs, argvec + 1);
+      return call_function_by_hand (argvec[0], NULL, nargs, argvec + 1);
     }
   throw_error (NOT_FOUND_ERROR,
                _("member function %s not found"), tstr);
@@ -884,7 +881,10 @@ value_args_as_decimal (struct value *arg1, struct value *arg2,
     {
       *byte_order_x = gdbarch_byte_order (get_type_arch (type2));
       *len_x = TYPE_LENGTH (type2);
-      decimal_from_integral (arg1, x, *len_x, *byte_order_x);
+      if (TYPE_UNSIGNED (type1))
+       decimal_from_ulongest (value_as_long (arg1), x, *len_x, *byte_order_x);
+      else
+       decimal_from_longest (value_as_long (arg1), x, *len_x, *byte_order_x);
     }
   else
     error (_("Don't know how to convert from %s to %s."), TYPE_NAME (type1),
@@ -903,7 +903,10 @@ value_args_as_decimal (struct value *arg1, struct value *arg2,
     {
       *byte_order_y = gdbarch_byte_order (get_type_arch (type1));
       *len_y = TYPE_LENGTH (type1);
-      decimal_from_integral (arg2, y, *len_y, *byte_order_y);
+      if (TYPE_UNSIGNED (type2))
+       decimal_from_ulongest (value_as_long (arg2), y, *len_y, *byte_order_y);
+      else
+       decimal_from_longest (value_as_long (arg2), y, *len_y, *byte_order_y);
     }
   else
     error (_("Don't know how to convert from %s to %s."), TYPE_NAME (type1),
This page took 0.023475 seconds and 4 git commands to generate.