sim: m32c: move test code to testsuite
authorMike Frysinger <vapier@gentoo.org>
Mon, 9 Nov 2015 05:13:08 +0000 (00:13 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 10 Nov 2015 05:19:49 +0000 (00:19 -0500)
Various target code belongs in the testsuite/ subdir, so move the m32c
code to match all the other targets.

13 files changed:
sim/m32c/ChangeLog
sim/m32c/Makefile.in
sim/m32c/blinky.S [deleted file]
sim/m32c/gloss.S [deleted file]
sim/m32c/sample.S [deleted file]
sim/m32c/sample.ld [deleted file]
sim/m32c/sample2.c [deleted file]
sim/testsuite/sim/m32c/ChangeLog [new file with mode: 0644]
sim/testsuite/sim/m32c/blinky.s [new file with mode: 0644]
sim/testsuite/sim/m32c/gloss.s [new file with mode: 0644]
sim/testsuite/sim/m32c/sample.ld [new file with mode: 0644]
sim/testsuite/sim/m32c/sample.s [new file with mode: 0644]
sim/testsuite/sim/m32c/sample2.c [new file with mode: 0644]

index 582d8dd3522f93297796fe8bfa8e5e083a9f01ec..c44e7eb7e0ab7eb57811897012e5021bb796b252 100644 (file)
@@ -1,3 +1,10 @@
+2015-11-09  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in (sample.x, sample.mot, sample2.x, sample2.o, gloss.o):
+       Delete targets.
+       * blinky.S: Moved to ../testsuite/sim/m32c/.
+       * gloss.S, sample.ld, sample.S, sample2.c: Likewise.
+
 2015-11-09  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in: Delete redundant dependency info.
index 5584563d6633fabdc486454dcdbd01eba1223982..36585a0d20c90e7375f8f5e852bc88020cfd4219 100644 (file)
@@ -40,8 +40,6 @@ SIM_OBJS = \
        trace.o \
        $(ENDLIST)
 
-# SIM_EXTRA_ALL = sample.x sample2.x
-
 LIBS = $B/bfd/libbfd.a $B/libiberty/libiberty.a
 
 ## COMMON_POST_CONFIG_FRAG
@@ -57,22 +55,6 @@ m32c.c : m32c.opc opc2c
 opc2c : opc2c.o safe-fgets.o
        $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^ -o $@ $(BUILD_LIBS)
 
-sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld
-       ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o
-       ../../ld/ld-new sample.o -o sample.x -T$(srcdir)/sample.ld
-
-sample.mot : sample.x
-       ../../binutils/objcopy --srec-forceS3 -O srec sample.x sample.mot
-
-sample2.x : sample2.o gloss.o $(srcdir)/sample.ld
-       ../../ld/ld-new sample2.o gloss.o -o sample2.x -T$(srcdir)/sample.ld
-
-sample2.o : $(srcdir)/sample2.c
-       ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample2.c -o sample2.o
-
-gloss.o : $(srcdir)/gloss.S
-       ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/gloss.S -o gloss.o
-
 encodings:
        grep '/\* [01]' $(srcdir)/r8c.opc | sort
 
diff --git a/sim/m32c/blinky.S b/sim/m32c/blinky.S
deleted file mode 100644 (file)
index 42345ec..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-;;; blinky.S --- sample program to blink LED's on M32C simulator
-;;; 
-;;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
-;;; Contributed by Red Hat, Inc.
-;;;
-;;; This file is part of the GNU simulators.
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-       .text
-
-       .global _start
-_start:
-       mov.w   #0xe1,a0
-top:
-       sub.w   #1,r0
-       mov.b   r0h,[a0]
-
-       mov.w   #1000,r1
-loop:
-       adjnz.w #-1,r1,loop
-
-       jmp.w   top
diff --git a/sim/m32c/gloss.S b/sim/m32c/gloss.S
deleted file mode 100644 (file)
index ccef95e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-;;; gloss.S --- system calls for sample2.x
-;;; 
-;;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
-;;; Contributed by Red Hat, Inc.
-;;;
-;;; This file is part of the GNU simulators.
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; See the 'sample2.x' target in Makefile.in.
-       .global _exit
-_exit:
-       mov.b   #1,r0l
-       ste.b   r0l,0xe0000
-       rts
-
-       .global _foo
-_foo:
-       mov.b   #2,r0l
-       ste.b   r0l,0xe0000
-       rts
diff --git a/sim/m32c/sample.S b/sim/m32c/sample.S
deleted file mode 100644 (file)
index 7668834..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-;;; sample.S --- simple test program for M32C simulator
-;;; 
-;;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
-;;; Contributed by Red Hat, Inc.
-;;;
-;;; This file is part of the GNU simulators.
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; See the 'sample.x' and sample.mot targets in Makefile.in.
-
-       .text
-
-       .global _start
-_start:
-       mov.w   #0x1234,r1
-       mov.w r1,r3 | sha.w #-8,r3 | sha.w #-7,r3
-       brk
diff --git a/sim/m32c/sample.ld b/sim/m32c/sample.ld
deleted file mode 100644 (file)
index 73574dc..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* sample2.ld --- linker script for sample2.x
-
-Copyright (C) 2005-2015 Free Software Foundation, Inc.
-Contributed by Red Hat, Inc.
-
-This file is part of the GNU simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* See the 'sample2.x' target in Makefile.in.  */
-
-ENTRY(_start)
-
-MEMORY {
-       RAM1 (w) : ORIGIN = 0xc800, LENGTH = 0x0200
-       RAM2 (w) : ORIGIN = 0xca56, LENGTH = 0x1000
-       ROM  (w) : ORIGIN = 0x30000, LENGTH = 0x1000
-}
-
-SECTIONS {
-       .data : {
-               *(.data*)
-       } > RAM1
-       .text : {
-               *(.text*)
-       } > RAM2
-       .fardata : {
-               *(.fardata*)
-       } > ROM
-}
diff --git a/sim/m32c/sample2.c b/sim/m32c/sample2.c
deleted file mode 100644 (file)
index 776989c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* sample2.c --- main source for sample2.x test program for M32C simulator
-
-Copyright (C) 2005-2015 Free Software Foundation, Inc.
-Contributed by Red Hat, Inc.
-
-This file is part of the GNU simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* See the 'sample2.x' target in Makefile.in.  */
-void exit (int);
-
-void
-start (void)
-{
-  foo (1, 2, 3, 4);
-  exit (5);
-}
diff --git a/sim/testsuite/sim/m32c/ChangeLog b/sim/testsuite/sim/m32c/ChangeLog
new file mode 100644 (file)
index 0000000..2c28054
--- /dev/null
@@ -0,0 +1,4 @@
+2015-11-09  Mike Frysinger  <vapier@gentoo.org>
+
+       * blinky.s: Moved from ../../../m32c/.
+       * gloss.s, sample.ld, sample.s, sample2.c: Likewise.
diff --git a/sim/testsuite/sim/m32c/blinky.s b/sim/testsuite/sim/m32c/blinky.s
new file mode 100644 (file)
index 0000000..725ac7c
--- /dev/null
@@ -0,0 +1,34 @@
+;;; blinky.s --- sample program to blink LED's on M32C simulator
+;;;
+;;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
+;;; Contributed by Red Hat, Inc.
+;;;
+;;; This file is part of the GNU simulators.
+;;;
+;;; This program is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+       .text
+
+       .global _start
+_start:
+       mov.w   #0xe1,a0
+top:
+       sub.w   #1,r0
+       mov.b   r0h,[a0]
+
+       mov.w   #1000,r1
+loop:
+       adjnz.w #-1,r1,loop
+
+       jmp.w   top
diff --git a/sim/testsuite/sim/m32c/gloss.s b/sim/testsuite/sim/m32c/gloss.s
new file mode 100644 (file)
index 0000000..981036d
--- /dev/null
@@ -0,0 +1,32 @@
+;;; gloss.s --- system calls for sample2.x
+;;;
+;;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
+;;; Contributed by Red Hat, Inc.
+;;;
+;;; This file is part of the GNU simulators.
+;;;
+;;; This program is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; See the 'sample2.x' target in Makefile.in.
+       .global _exit
+_exit:
+       mov.b   #1,r0l
+       ste.b   r0l,0xe0000
+       rts
+
+       .global _foo
+_foo:
+       mov.b   #2,r0l
+       ste.b   r0l,0xe0000
+       rts
diff --git a/sim/testsuite/sim/m32c/sample.ld b/sim/testsuite/sim/m32c/sample.ld
new file mode 100644 (file)
index 0000000..73574dc
--- /dev/null
@@ -0,0 +1,41 @@
+/* sample2.ld --- linker script for sample2.x
+
+Copyright (C) 2005-2015 Free Software Foundation, Inc.
+Contributed by Red Hat, Inc.
+
+This file is part of the GNU simulators.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* See the 'sample2.x' target in Makefile.in.  */
+
+ENTRY(_start)
+
+MEMORY {
+       RAM1 (w) : ORIGIN = 0xc800, LENGTH = 0x0200
+       RAM2 (w) : ORIGIN = 0xca56, LENGTH = 0x1000
+       ROM  (w) : ORIGIN = 0x30000, LENGTH = 0x1000
+}
+
+SECTIONS {
+       .data : {
+               *(.data*)
+       } > RAM1
+       .text : {
+               *(.text*)
+       } > RAM2
+       .fardata : {
+               *(.fardata*)
+       } > ROM
+}
diff --git a/sim/testsuite/sim/m32c/sample.s b/sim/testsuite/sim/m32c/sample.s
new file mode 100644 (file)
index 0000000..1c5f23d
--- /dev/null
@@ -0,0 +1,27 @@
+;;; sample.s --- simple test program for M32C simulator
+;;;
+;;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
+;;; Contributed by Red Hat, Inc.
+;;;
+;;; This file is part of the GNU simulators.
+;;;
+;;; This program is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+       .text
+
+       .global _start
+_start:
+       mov.w   #0x1234,r1
+       mov.w r1,r3 | sha.w #-8,r3 | sha.w #-7,r3
+       brk
diff --git a/sim/testsuite/sim/m32c/sample2.c b/sim/testsuite/sim/m32c/sample2.c
new file mode 100644 (file)
index 0000000..776989c
--- /dev/null
@@ -0,0 +1,29 @@
+/* sample2.c --- main source for sample2.x test program for M32C simulator
+
+Copyright (C) 2005-2015 Free Software Foundation, Inc.
+Contributed by Red Hat, Inc.
+
+This file is part of the GNU simulators.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* See the 'sample2.x' target in Makefile.in.  */
+void exit (int);
+
+void
+start (void)
+{
+  foo (1, 2, 3, 4);
+  exit (5);
+}
This page took 0.031087 seconds and 4 git commands to generate.