From: Kevin Buettner Date: Thu, 16 Feb 2012 23:17:27 +0000 (+0000) Subject: Update sim_fetch_register, sim_store_register for sh and mn10300. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f95586a44d28c31728d034502ba80ea98cda3ab8;p=binutils-gdb.git Update sim_fetch_register, sim_store_register for sh and mn10300. Fix compile warnings for sh built on 64-bit hosts. --- diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index e8c845d23d9..8b9fa1f16e5 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2012-02-16 Kevin Buettner + + * interp.c (sim_fetch_register): Return length, not -1. + 2012-01-02 Joel Brobecker * sim-main.h: Reformat copyright header. diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index e06ae590793..9c458d65843 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -383,7 +383,7 @@ sim_fetch_register (SIM_DESC sd, int length) { put_word (memory, State.regs[rn]); - return -1; + return length; } int diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index a5f530ca0a8..f663c00813b 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,10 @@ +2012-02-16 Kevin Buettner + + * interp.c (MA): Adjust cast to avoid warning on 64-bit hosts. + + * interp.c (sim_store_register, sim_fetch_register): Return + length, not -1. + 2011-12-03 Mike Frysinger * aclocal.m4: New file. diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 20239def614..e9313c76cbd 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -862,7 +862,7 @@ do { \ #else #define MA(n) \ - do { memstalls += ((((int) PC & 3) != 0) ? (n) : ((n) - 1)); } while (0) + do { memstalls += ((((long) PC & 3) != 0) ? (n) : ((n) - 1)); } while (0) #define L(x) thislock = x; #define TL(x) if ((x) == prevlock) stalls++; @@ -2356,7 +2356,7 @@ sim_store_register (sd, rn, memory, length) default: return 0; } - return -1; + return length; } int @@ -2531,7 +2531,7 @@ sim_fetch_register (sd, rn, memory, length) return 0; } * (int *) memory = swap (val); - return -1; + return length; } int