sim: v850: fix handling of SYS_times
[deliverable/binutils-gdb.git] / sim / v850 / simops.c
index b8b3856ec666af2067356263314c231ca2cdae71..421afeef6e40103ab59a00fa6894e522c3b2688a 100644 (file)
@@ -7,22 +7,11 @@
 #ifdef HAVE_UTIME_H
 #include <utime.h>
 #endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "targ-vals.h"
 
@@ -1915,7 +1904,7 @@ OP_10007E0 (void)
            store_mem (PARM1 + 4, 4, tms.tms_stime);
            store_mem (PARM1 + 8, 4, tms.tms_cutime);
            store_mem (PARM1 + 12, 4, tms.tms_cstime);
-           reterr = errno;
+           RETERR = errno;
            break;
          }
 #endif
@@ -3317,7 +3306,7 @@ v850_bins (SIM_DESC sd, unsigned int source, unsigned int lsb, unsigned int msb,
   pos = lsb;
   width = (msb - lsb) + 1;
 
-  mask = ~ (-1 << width);
+  mask = ~ (-(1 << width));
   source &= mask;
   mask <<= pos;
   result = (* dest) & ~ mask;
This page took 0.02377 seconds and 4 git commands to generate.