* cris.h (R_CRIS_32_IE): New relocation.
[deliverable/binutils-gdb.git] / gdb / valarith.c
index 86accdd57d7d1313ebaacfd6da58c484ab3d8020..59f67d3ed6f7b0a666aa5f31fb1826e9ce0bb75f 100644 (file)
@@ -359,8 +359,6 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op,
 
   arg1 = coerce_ref (arg1);
   arg2 = coerce_ref (arg2);
-  arg1 = coerce_enum (arg1);
-  arg2 = coerce_enum (arg2);
 
   /* now we know that what we have to do is construct our
      arg vector and find the right function to call it with.  */
@@ -520,7 +518,6 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
   int static_memfuncp, nargs;
 
   arg1 = coerce_ref (arg1);
-  arg1 = coerce_enum (arg1);
 
   /* now we know that what we have to do is construct our
      arg vector and find the right function to call it with.  */
@@ -549,13 +546,13 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
       break;
     case UNOP_POSTINCREMENT:
       strcpy (ptr, "++");
-      argvec[2] = value_from_longest (builtin_type_int, 0);
+      argvec[2] = value_from_longest (builtin_type_int8, 0);
       argvec[3] = 0;
       nargs ++;
       break;
     case UNOP_POSTDECREMENT:
       strcpy (ptr, "--");
-      argvec[2] = value_from_longest (builtin_type_int, 0);
+      argvec[2] = value_from_longest (builtin_type_int8, 0);
       argvec[3] = 0;
       nargs ++;
       break;
@@ -876,14 +873,6 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
   struct value *val;
   struct type *type1, *type2, *result_type;
 
-  /* For shift and integer exponentiation operations,
-     only promote the first argument.  */
-  if ((op == BINOP_LSH || op == BINOP_RSH || op == BINOP_EXP)
-      && is_integral_type (value_type (arg2)))
-    unop_promote (current_language, current_gdbarch, &arg1);
-  else
-    binop_promote (current_language, current_gdbarch, &arg1, &arg2);
-
   arg1 = coerce_ref (arg1);
   arg2 = coerce_ref (arg2);
 
@@ -1295,7 +1284,7 @@ value_logical_not (struct value *arg1)
   const gdb_byte *p;
   struct type *type1;
 
-  arg1 = coerce_number (arg1);
+  arg1 = coerce_array (arg1);
   type1 = check_typedef (value_type (arg1));
 
   if (TYPE_CODE (type1) == TYPE_CODE_FLT)
@@ -1489,8 +1478,6 @@ value_pos (struct value *arg1)
 {
   struct type *type;
 
-  unop_promote (current_language, current_gdbarch, &arg1);
-
   arg1 = coerce_ref (arg1);
   type = check_typedef (value_type (arg1));
 
@@ -1514,8 +1501,6 @@ value_neg (struct value *arg1)
 {
   struct type *type;
 
-  unop_promote (current_language, current_gdbarch, &arg1);
-
   arg1 = coerce_ref (arg1);
   type = check_typedef (value_type (arg1));
 
@@ -1553,8 +1538,6 @@ value_complement (struct value *arg1)
 {
   struct type *type;
 
-  unop_promote (current_language, current_gdbarch, &arg1);
-
   arg1 = coerce_ref (arg1);
   type = check_typedef (value_type (arg1));
 
@@ -1580,8 +1563,7 @@ value_bit_index (struct type *type, const gdb_byte *valaddr, int index)
   if (index < low_bound || index > high_bound)
     return -1;
   rel_index = index - low_bound;
-  word = unpack_long (builtin_type_unsigned_char,
-                     valaddr + (rel_index / TARGET_CHAR_BIT));
+  word = extract_unsigned_integer (valaddr + (rel_index / TARGET_CHAR_BIT), 1);
   rel_index %= TARGET_CHAR_BIT;
   if (gdbarch_bits_big_endian (current_gdbarch))
     rel_index = TARGET_CHAR_BIT - 1 - rel_index;
This page took 0.024399 seconds and 4 git commands to generate.