This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] sim: dv-pal: always use CPU_INDEX


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=268c91391a3235cb00249b6eb9a2cb7341914fed

commit 268c91391a3235cb00249b6eb9a2cb7341914fed
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Dec 25 00:09:48 2015 -0500

    sim: dv-pal: always use CPU_INDEX
    
    Since the core always provides CPU_INDEX, use it.  The current code
    doesn't actually use it even though it should since it doesn't include
    the right headers.

Diff:
---
 sim/common/ChangeLog | 5 +++++
 sim/common/dv-pal.c  | 7 ++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 857485c..0778130 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-25  Mike Frysinger  <vapier@gentoo.org>
+
+	* dv-pal.c: Include config.h and sim-main.h.
+	(hw_pal_io_read_buffer): Always call CPU_INDEX.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
 	* sim-options.c (standard_options): Always enable load-lma and
diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c
index 97f01c8..d564e3e 100644
--- a/sim/common/dv-pal.c
+++ b/sim/common/dv-pal.c
@@ -19,7 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+#include "config.h"
+#include "sim-main.h"
 #include "hw-main.h"
 #include "sim-io.h"
 
@@ -349,11 +350,7 @@ hw_pal_io_read_buffer (struct hw *me,
     {
 
     case hw_pal_cpu_nr_register:
-#ifdef CPU_INDEX
       *byte = CPU_INDEX (hw_system_cpu (me));
-#else
-      *byte = 0;
-#endif
       HW_TRACE ((me, "read - cpu-nr %d\n", *byte));
       break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]