]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: make LMA loading the default for all targets
authorMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 02:36:09 +0000 (21:36 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 02:50:17 +0000 (21:50 -0500)
Most targets already default to loading code via their LMA, but for
a few, this means the default changes from loading VMA to LMA.  It's
better to have the different targets be consistent, and allows some
code clean up.

25 files changed:
sim/bfin/ChangeLog
sim/bfin/tconfig.h
sim/common/ChangeLog
sim/common/sim-options.c
sim/cris/ChangeLog
sim/cris/tconfig.h
sim/frv/ChangeLog
sim/frv/tconfig.h
sim/iq2000/ChangeLog
sim/iq2000/tconfig.h
sim/lm32/ChangeLog
sim/lm32/tconfig.h
sim/m32r/ChangeLog
sim/m32r/tconfig.h
sim/m68hc11/ChangeLog
sim/m68hc11/sim-main.h
sim/mips/ChangeLog
sim/mips/tconfig.h
sim/mn10300/ChangeLog
sim/mn10300/sim-main.h
sim/sh64/ChangeLog
sim/sh64/tconfig.h
sim/testsuite/sim/cr16/ChangeLog
sim/testsuite/sim/cr16/allinsn.exp
sim/testsuite/sim/cr16/misc.exp

index ac4b7742005fde361c696171fd3f592cf75fbd0d..1deb4ea235c311e61b1f7cee1ae76989aecbcc90 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-11-17  Mike Frysinger  <vapier@gentoo.org>
 
        * tconfig.h (WITH_MODULO_MEMORY): Delete.
index a3e6f7bf7c1e73898c81488f949ac55a77841fb4..254aba9b984ffa7763443e7b0c63ed5eb45fc061 100644 (file)
@@ -1,8 +1,5 @@
 /* Blackfin target configuration file.  -*- C -*- */
 
-/* See sim-hload.c.  We properly handle LMA. -- TODO: check this */
-#define SIM_HANDLES_LMA 1
-
 /* We use this so that we are passed the requesting CPU for HW acesses.
    Common sim core by default sets hw_system_cpu to NULL for WITH_HW.  */
 #define WITH_DEVICES 1
index 8340928989506ebcc803a6b35a778c6936572a95..857485c674c22f0ac88ad428e2e83d5ed0635ced 100644 (file)
@@ -1,3 +1,9 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-options.c (standard_options): Always enable load-lma and
+       load-vma options.
+       (standard_install): Always set STATE_LOAD_AT_LMA_P(sd) to 1.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-module.c (MODULE_LIST): Delete.
index 69655b02afd324e98a3f8adc6e3294e0a65b03f9..95ed2c80008036b5ae5e6b0df44fd154006049f4 100644 (file)
@@ -167,18 +167,12 @@ static const OPTION standard_options[] =
       '\0', "BFDNAME", "Specify the object-code format for the object files",
       standard_option_handler },
 
-#ifdef SIM_HANDLES_LMA
   { {"load-lma", no_argument, NULL, OPTION_LOAD_LMA},
       '\0', NULL,
-#if SIM_HANDLES_LMA
     "Use VMA or LMA addresses when loading image (default LMA)",
-#else
-    "Use VMA or LMA addresses when loading image (default VMA)",
-#endif
       standard_option_handler, "load-{lma,vma}" },
   { {"load-vma", no_argument, NULL, OPTION_LOAD_VMA},
       '\0', NULL, "", standard_option_handler,  "" },
-#endif
 
   { {"sysroot", required_argument, NULL, OPTION_SYSROOT},
       '\0', "SYSROOT",
@@ -423,9 +417,7 @@ standard_install (SIM_DESC sd)
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
   if (sim_add_option_table (sd, NULL, standard_options) != SIM_RC_OK)
     return SIM_RC_FAIL;
-#ifdef SIM_HANDLES_LMA
-  STATE_LOAD_AT_LMA_P (sd) = SIM_HANDLES_LMA;
-#endif
+  STATE_LOAD_AT_LMA_P (sd) = 1;
   return SIM_RC_OK;
 }
 
index 4bca1e1359e9e198ce7c737c08c26151a76172a3..7b7618c0cbd4e6e7787b47645c54d70711948b8f 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-11-15  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_OBJS): Delete sim-reason.o, sim-reg.o, and
index e512c3dc9b0c10ae8770e1dc6eac8efe3db6ab0b..77b000fe61b0fc62714346ed97278e0aec267f82 100644 (file)
@@ -24,9 +24,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
    file.  I just copied it from m32r, pruned some stuff and added
    HAVE_MODEL because it seemed useful.  */
 
-/* See sim-hload.c.  We properly handle LMA.  */
-#define SIM_HANDLES_LMA 1
-
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 1
 
index 513711122fa762179f87dcdbccf6a0f1d8da7924..4f0dd8f310b15564de3a12cc22ce6c8b7af6a856 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
index f0de19afb75f79cb475b6701ab11196ec9cf0bbd..044cfb0712134cd3f68a33081d006f8b84c75b29 100644 (file)
@@ -1,8 +1,5 @@
 /* FRV target configuration file.  -*- C -*- */
 
-/* See sim-hload.c.  We properly handle LMA. -- TODO: check this */
-#define SIM_HANDLES_LMA 1
-
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 1
 
index 30f950154aaba870043323e4bb97968610dfcdf1..770a2be1e824e85a506ab425da6ca4bab1493d73 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
index ae0bf3ae71ce42af6a75205e090a4ffc83819441..bd5a3aee8e24e7d094d88c4269ba7debcfb6dd5d 100644 (file)
@@ -1,8 +1,5 @@
 /* IQ2000 target configuration file.  -*- C -*- */
 
-/* See sim-hload.c.  We properly handle LMA. -- TODO: check this */
-#define SIM_HANDLES_LMA 1
-
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 0
 
index 081be3717c6baf156779e1caf177fc8a869a2b68..93e7d98dcc545c8e04dd9e62207c6610134126ae 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-11-15  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_OBJS): Delete sim-reason.o, sim-reg.o, and
index 0970c810801306d79ae8004d9534b26a7600c470..7db04f9d1021a8e583b9de59ba77bee26378f056 100644 (file)
@@ -19,9 +19,6 @@
 #ifndef LM32_TCONFIG_H
 #define LM32_TCONFIG_H
 
-/* See sim-hload.c.  We properly handle LMA.  */
-#define SIM_HANDLES_LMA 1
-
 #define WITH_SCACHE_PBB 1
 
 #endif /* LM32_TCONFIG_H */
index 616fb2ad9565b4df7bded7e8df503a2e9c6af4da..f81e61bd8f8eebd7e97148620d62ab313606f30b 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
index 72a7f6833835a551493129239e8d0cdc1c09ed6a..0a43607416b09f2b1c0e6b172823c96f0e7caf93 100644 (file)
@@ -3,9 +3,6 @@
 #ifndef M32R_TCONFIG_H
 #define M32R_TCONFIG_H
 
-/* See sim-hload.c.  We properly handle LMA.  */
-#define SIM_HANDLES_LMA 1
-
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 1
 
index 7ba16fa1e2e3ce2a053d8e755e91fc7cd2b39620..4a20b5510d6f2e1424888faeba389fd5edbf2082 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-main.h (SIM_HANDLES_LMA): Delete.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h (WITH_WATCHPOINTS): Delete.
index 144095ac5f444e71b6ff90222a57820e991a5833..208b6ab204a3c9e4bc79788b7afd08b8fe26e8ce 100644 (file)
@@ -20,8 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef _SIM_MAIN_H
 #define _SIM_MAIN_H
 
-#define SIM_HANDLES_LMA 1
-
 #include "sim-basics.h"
 #include "sim-signal.h"
 #include "sim-base.h"
index 93c1814e4ee5a62cb3f45fa4a5c4a4b5200446ac..9974526fa79ccef125a50d8f9c7b0dd23ae5f080 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h (WITH_WATCHPOINTS): Delete.
index 136015a06d71fe73d0cae38dc5cc526a1742785d..a8c91858aaf29c0ee9b15a2de8118e41670e6b40 100644 (file)
@@ -1,11 +1,4 @@
 /* mips target configuration file.  */
 
-/* See sim-hload.c.  We properly handle LMA.  */
-#ifdef TARGET_TX3904
-#define SIM_HANDLES_LMA 1
-#else
-#define SIM_HANDLES_LMA 0
-#endif
-
 /* MIPS uses an unusual format for floating point quiet NaNs.  */
 #define SIM_QUIET_NAN_NEGATED
index 0034efcd4185aa0e41a371d7c3cb9c1764a9dbe5..bce17726d8894fe72682504fcdc99b7e2515172a 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-main.h (SIM_HANDLES_LMA): Delete.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h (WITH_WATCHPOINTS): Delete.
index b489ad0a0a160e8001926cceb5b2e96992526c8f..64562ee344f0eae09973f5735f48e7ad9a242591 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HANDLES_LMA 1
-
 #define SIM_ENGINE_HALT_HOOK(SD,LAST_CPU,CIA) 0 /* disable this hook */
 
 #include "sim-basics.h"
index cd8f50bd9b06940247d96a955d5617900ddf2548..92fcf75364cc49dc5a807547d9db1417d46770b4 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.h (SIM_HANDLES_LMA): Delete.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
index 1440566626b7a7f53342cb8becc7693d3a8ba7fc..4f4d9b74e8d5eb16f261d0c1d5825756bfa2a1e0 100644 (file)
@@ -1,8 +1,5 @@
 /* SH64 target configuration file.  -*- C -*- */
 
-/* See sim-hload.c.  We properly handle LMA. -- TODO: check this */
-#define SIM_HANDLES_LMA 1
-
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 0
 
index e6b2466524f2e3a0ef77a80c60f8b58791957ce0..4cb008b68abc789566a88580372e95596e9940d6 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * allinsn.exp: Append --load-vma to global_sim_options.
+       * misc.exp: Likewise.
+
 2015-03-29  Mike Frysinger  <vapier@gentoo.org>
 
        PR sim/12385
index 392e70f86319c1eb8d76c4b761821e5de81e79d1..852a673c360163046c8ae93a3ab3f418fe0c4a8c 100644 (file)
@@ -1,6 +1,5 @@
 # CR16 simulator testsuite.
 
-
 if [istarget cr16*-*-*] {
     # load support procs
     # load_lib cgen.exp
@@ -8,6 +7,14 @@ if [istarget cr16*-*-*] {
     # all machines
     set all_machs "cr16"
 
+    global global_sim_options
+    if ![info exists global_sim_options] {
+       set global_sim_options ""
+    }
+    set saved_global_sim_options $global_sim_options
+    # The cr16 linker sets the default LMA base to 0, and all the code
+    # expects the VMA when running, so use that when running the tests.
+    set global_sim_options "$saved_global_sim_options --load-vma"
 
     # The .cgs suffix is for "cgen .s".
     foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.cgs]] {
@@ -19,4 +26,6 @@ if [istarget cr16*-*-*] {
 
        run_sim_test $src $all_machs
     }
+
+    set global_sim_options $saved_global_sim_options
 }
index 5fe512da0d8b9a543000b030cb9e30fa92bcdf8b..39dd3a4caa3cd737ccdea929e79a3ee13fefca5f 100644 (file)
@@ -7,6 +7,14 @@ if [istarget cr16*-*-*] {
     # all machines
     set all_machs "cr16"
 
+    global global_sim_options
+    if ![info exists global_sim_options] {
+       set global_sim_options ""
+    }
+    set saved_global_sim_options $global_sim_options
+    # The cr16 linker sets the default LMA base to 0, and all the code
+    # expects the VMA when running, so use that when running the tests.
+    set global_sim_options "$saved_global_sim_options --load-vma"
 
     # The .ms suffix is for "miscellaneous .s".
     foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.ms]] {
@@ -18,4 +26,6 @@ if [istarget cr16*-*-*] {
 
        run_sim_test $src $all_machs
     }
+
+    set global_sim_options $saved_global_sim_options
 }