OSDN Git Service

* lib/target-supports.exp (check_effective_target_simulator): New.
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Feb 2007 10:08:50 +0000 (10:08 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Feb 2007 10:08:50 +0000 (10:08 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121683 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index d976bd0..cf14bb0 100644 (file)
@@ -1,3 +1,7 @@
+2007-02-07  Hans-Peter Nilsson  <hp@axis.com>
+
+       * lib/target-supports.exp (check_effective_target_simulator): New. 
+
 2007-02-06  Zdenek Dvorak <dvorakz@suse.cz>
 
        * gcc.dg/tree-ssa/loop-25.c: New test.
 2007-02-06  Zdenek Dvorak <dvorakz@suse.cz>
 
        * gcc.dg/tree-ssa/loop-25.c: New test.
index c6b2a68..2c9d3c4 100644 (file)
@@ -2091,3 +2091,22 @@ proc check_effective_target_stdint_types { } {
        uint8_t e; uint16_t f; uint32_t g; uint64_t h;
     }]
 }
        uint8_t e; uint16_t f; uint32_t g; uint64_t h;
     }]
 }
+
+# Return 1 if programs are intended to be run on a simulator
+# (i.e. slowly) rather than hardware (i.e. fast).
+
+proc check_effective_target_simulator { } {
+
+    # All "src/sim" simulators set this one.
+    if [board_info target exists is_simulator] {
+       return [board_info target is_simulator]
+    }
+
+    # The "sid" simulators don't set that one, but at least they set
+    # this one.
+    if [board_info target exists slow_simulator] {
+       return [board_info target slow_simulator]
+    }
+
+    return 0
+}