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] Adjust default memory size and stack base address for SH simulator.


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

commit 417a667c4afc1e04ba2caadc3f4051e0590585bb
Author: Oleg Endo <olegendo@gcc.gnu.org>
Date:   Sat Apr 9 10:24:00 2016 +0900

    Adjust default memory size and stack base address for SH simulator.
    
    ld/ChangeLog:
    	* sh/interp.c (sim_memory_size): Default init to 30.
    	(parse_and_set_memory_size): Adjust upper bound to 31.
    
    sim/ChangeLog:
    	* sh/interp.c (sim_memory_size): Default init to 30.
    	(parse_and_set_memory_size): Adjust upper bound to 31.

Diff:
---
 ld/ChangeLog           | 4 ++++
 ld/emulparams/shelf.sh | 4 ++--
 sim/ChangeLog          | 5 +++++
 sim/sh/interp.c        | 6 +++---
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3c40941..3d42d9f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-09  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	* emulparams/shelf.sh: Set stack area to 0x3FFFFF00.
+
 2016-04-08  Alan Modra  <amodra@gmail.com>
 
 	PR 18452
diff --git a/ld/emulparams/shelf.sh b/ld/emulparams/shelf.sh
index 5757b81..83680a6 100644
--- a/ld/emulparams/shelf.sh
+++ b/ld/emulparams/shelf.sh
@@ -18,13 +18,13 @@ CTOR_START='___ctors = .;'
 CTOR_END='___ctors_end = .;'
 DTOR_START='___dtors = .;'
 DTOR_END='___dtors_end = .;'
-# This is like setting STACK_ADDR to 0x300000, except that the setting can
+# This is like setting STACK_ADDR to 0x3FFFFF00, except that the setting can
 # be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra
 # sentinal value at the bottom.
 # N.B. We can't use PROVIDE to set the default value in a symbol because
 # the address is needed to place the .stack section, which in turn is needed
 # to hold the sentinel value(s).
-test -z "$CREATE_SHLIB" && OTHER_SECTIONS="  .stack        ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : 0x300000)} :
+test -z "$CREATE_SHLIB" && OTHER_SECTIONS="  .stack        ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : 0x3FFFFF00)} :
   {
     ${RELOCATING+_stack = .;}
     *(.stack)
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 76c384d..c316d17 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-09  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	* sh/interp.c (sim_memory_size): Default init to 30.
+	(parse_and_set_memory_size): Adjust upper bound to 31.
+
 2016-02-03  Maciej W. Rozycki  <macro@linux-mips.org>
 
 	* MAINTAINERS (Past sim maintainers): Add Thiemo Seufer.
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index df29f96..46701e2 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -722,7 +722,7 @@ do { \
 #if defined(__GO32__)
 int sim_memory_size = 19;
 #else
-int sim_memory_size = 24;
+int sim_memory_size = 30;
 #endif
 
 static int sim_profile_size = 17;
@@ -2477,10 +2477,10 @@ parse_and_set_memory_size (SIM_DESC sd, const char *str)
   int n;
 
   n = strtol (str, NULL, 10);
-  if (n > 0 && n <= 24)
+  if (n > 0 && n <= 31)
     sim_memory_size = n;
   else
-    sim_io_printf (sd, "Bad memory size %d; must be 1 to 24, inclusive\n", n);
+    sim_io_printf (sd, "Bad memory size %d; must be 1 to 31, inclusive\n", n);
 }
 
 SIM_RC


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