* solist.h (struct target_so_ops): New member clear_so.
[deliverable/binutils-gdb.git] / gdb / lm32-tdep.c
index dd5eae8900f6cc814c796387383aff65684d8c27..11cf897cc971d71514e1e73d3194104e72b91f90 100644 (file)
@@ -1,7 +1,7 @@
 /* Target-dependent code for Lattice Mico32 processor, for GDB.
    Contributed by Jon Beniston <jon@beniston.com>
 
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -349,18 +349,18 @@ lm32_store_return_value (struct type *type, struct regcache *regcache,
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   ULONGEST val;
+  int len = TYPE_LENGTH (type);
 
-  if (TYPE_LENGTH (type) <= 4)
+  if (len <= 4)
     {
-      val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
+      val = extract_unsigned_integer (valbuf, len, byte_order);
       regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
     }
-  else if (TYPE_LENGTH (type) <= 8)
+  else if (len <= 8)
     {
       val = extract_unsigned_integer (valbuf, 4, byte_order);
       regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
-      val = extract_unsigned_integer (valbuf + 4, TYPE_LENGTH (type) - 4,
-                                     byte_order);
+      val = extract_unsigned_integer (valbuf + 4, len - 4, byte_order);
       regcache_cooked_write_unsigned (regcache, SIM_LM32_R2_REGNUM, val);
     }
   else
This page took 0.024889 seconds and 4 git commands to generate.