OpenCores
URL https://opencores.org/ocsvn/zipcpu/zipcpu/trunk

Subversion Repositories zipcpu

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /zipcpu/trunk
    from Rev 116 to Rev 117
    Reverse comparison

Rev 116 → Rev 117

/sw/gcc-zippatch.patch
46,6 → 46,24
esac
# If we aren't building newlib, then don't build libgloss, since libgloss
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/cfgexpand.c gcc-5.3.0-zip/gcc/cfgexpand.c
--- gcc-5.3.0-original/gcc/cfgexpand.c 2015-07-23 06:39:26.000000000 -0400
+++ gcc-5.3.0-zip/gcc/cfgexpand.c 2016-04-01 06:40:17.288326711 -0400
@@ -108,6 +108,14 @@
#include "tree-chkp.h"
#include "rtl-chkp.h"
+#ifdef DO_ZIP_DEBUGS
+#include <stdio.h>
+#define ZIP_DEBUG_LINE(STR,RTX) do{fprintf(stderr,"%s:%d/%s\n",__FILE__,__LINE__,STR); zip_debug_rtx(RTX);} while(0)
+extern void zip_debug_rtx(const_rtx);
+#else
+#define ZIP_DEBUG_LINE(STR,RTX)
+#endif
+
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
give the same symbol without quotes for an alternative entry point. You
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/cgraphbuild.c gcc-5.3.0-zip/gcc/cgraphbuild.c
--- gcc-5.3.0-original/gcc/cgraphbuild.c 2015-01-09 15:18:42.000000000 -0500
+++ gcc-5.3.0-zip/gcc/cgraphbuild.c 2016-03-24 22:13:24.815287808 -0400
120,7 → 138,7
+
+struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/aarch64/aarch64-linux.h gcc-5.3.0-zip/gcc/config/aarch64/aarch64-linux.h
--- gcc-5.3.0-original/gcc/config/aarch64/aarch64-linux.h 2016-03-25 11:55:15.492451356 -0400
--- gcc-5.3.0-original/gcc/config/aarch64/aarch64-linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/aarch64/aarch64-linux.h 2015-07-24 12:00:26.000000000 -0400
@@ -21,7 +21,7 @@
#ifndef GCC_AARCH64_LINUX_H
132,7 → 150,7
#undef ASAN_CC1_SPEC
#define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/alpha/linux-elf.h gcc-5.3.0-zip/gcc/config/alpha/linux-elf.h
--- gcc-5.3.0-original/gcc/config/alpha/linux-elf.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/alpha/linux-elf.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/alpha/linux-elf.h 2015-01-05 07:33:28.000000000 -0500
@@ -23,8 +23,8 @@
#define EXTRA_SPECS \
146,7 → 164,7
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif DEFAULT_LIBC == LIBC_GLIBC
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/arm/linux-eabi.h gcc-5.3.0-zip/gcc/config/arm/linux-eabi.h
--- gcc-5.3.0-original/gcc/config/arm/linux-eabi.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/arm/linux-eabi.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/arm/linux-eabi.h 2015-01-05 07:33:28.000000000 -0500
@@ -68,8 +68,8 @@
GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
160,7 → 178,7
#define GLIBC_DYNAMIC_LINKER \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/arm/linux-elf.h gcc-5.3.0-zip/gcc/config/arm/linux-elf.h
--- gcc-5.3.0-original/gcc/config/arm/linux-elf.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/arm/linux-elf.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/arm/linux-elf.h 2015-06-23 05:26:54.000000000 -0400
@@ -62,7 +62,7 @@
172,7 → 190,7
#define LINUX_TARGET_LINK_SPEC "%{h*} \
%{static:-Bstatic} \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/bfin/linux.h gcc-5.3.0-zip/gcc/config/bfin/linux.h
--- gcc-5.3.0-original/gcc/config/bfin/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/bfin/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/bfin/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -45,7 +45,7 @@
%{shared:-G -Bdynamic} \
184,7 → 202,7
#undef TARGET_SUPPORTS_SYNC_CALLS
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/cris/linux.h gcc-5.3.0-zip/gcc/config/cris/linux.h
--- gcc-5.3.0-original/gcc/config/cris/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/cris/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/cris/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -102,7 +102,7 @@
#undef CRIS_DEFAULT_CPU_VERSION
196,7 → 214,7
#undef CRIS_LINK_SUBTARGET_SPEC
#define CRIS_LINK_SUBTARGET_SPEC \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/freebsd-spec.h gcc-5.3.0-zip/gcc/config/freebsd-spec.h
--- gcc-5.3.0-original/gcc/config/freebsd-spec.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/freebsd-spec.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/freebsd-spec.h 2015-06-25 13:53:14.000000000 -0400
@@ -129,9 +129,9 @@
#endif
211,7 → 229,7
/* NOTE: The freebsd-spec.h header is included also for various
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/frv/linux.h gcc-5.3.0-zip/gcc/config/frv/linux.h
--- gcc-5.3.0-original/gcc/config/frv/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/frv/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/frv/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -34,7 +34,7 @@
#define ENDFILE_SPEC \
223,7 → 241,7
#undef LINK_SPEC
#define LINK_SPEC "\
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/i386/gnu.h gcc-5.3.0-zip/gcc/config/i386/gnu.h
--- gcc-5.3.0-original/gcc/config/i386/gnu.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/i386/gnu.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/i386/gnu.h 2015-01-05 07:33:28.000000000 -0500
@@ -22,7 +22,7 @@
#define GNU_USER_LINK_EMULATION "elf_i386"
235,7 → 253,7
#undef STARTFILE_SPEC
#if defined HAVE_LD_PIE
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/i386/kfreebsd-gnu64.h gcc-5.3.0-zip/gcc/config/i386/kfreebsd-gnu64.h
--- gcc-5.3.0-original/gcc/config/i386/kfreebsd-gnu64.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/i386/kfreebsd-gnu64.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/i386/kfreebsd-gnu64.h 2015-01-05 07:33:28.000000000 -0500
@@ -22,6 +22,6 @@
#define GNU_USER_LINK_EMULATION64 "elf_x86_64_fbsd"
248,7 → 266,7
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-kfreebsd-x86-64.so.1"
+#define GLIBC_DYNAMIC_LINKERX32 "/lib/ld-kfreebsd-x32.so.1"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/i386/kfreebsd-gnu.h gcc-5.3.0-zip/gcc/config/i386/kfreebsd-gnu.h
--- gcc-5.3.0-original/gcc/config/i386/kfreebsd-gnu.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/i386/kfreebsd-gnu.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/i386/kfreebsd-gnu.h 2015-01-05 07:33:28.000000000 -0500
@@ -19,4 +19,4 @@
<http://www.gnu.org/licenses/>. */
257,7 → 275,7
-#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/i386/linux64.h gcc-5.3.0-zip/gcc/config/i386/linux64.h
--- gcc-5.3.0-original/gcc/config/i386/linux64.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/i386/linux64.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/i386/linux64.h 2015-01-05 07:33:28.000000000 -0500
@@ -27,6 +27,6 @@
#define GNU_USER_LINK_EMULATION64 "elf_x86_64"
270,7 → 288,7
+#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/i386/linux.h gcc-5.3.0-zip/gcc/config/i386/linux.h
--- gcc-5.3.0-original/gcc/config/i386/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/i386/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/i386/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -20,4 +20,4 @@
<http://www.gnu.org/licenses/>. */
279,7 → 297,7
-#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/ia64/linux.h gcc-5.3.0-zip/gcc/config/ia64/linux.h
--- gcc-5.3.0-original/gcc/config/ia64/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/ia64/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/ia64/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -55,7 +55,7 @@
/* Define this for shared library support because it isn't in the main
291,7 → 309,7
#undef LINK_SPEC
#define LINK_SPEC "\
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/knetbsd-gnu.h gcc-5.3.0-zip/gcc/config/knetbsd-gnu.h
--- gcc-5.3.0-original/gcc/config/knetbsd-gnu.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/knetbsd-gnu.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/knetbsd-gnu.h 2015-01-05 07:33:28.000000000 -0500
@@ -32,4 +32,4 @@
300,7 → 318,7
-#define GNU_USER_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/kopensolaris-gnu.h gcc-5.3.0-zip/gcc/config/kopensolaris-gnu.h
--- gcc-5.3.0-original/gcc/config/kopensolaris-gnu.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/kopensolaris-gnu.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/kopensolaris-gnu.h 2015-01-05 07:33:28.000000000 -0500
@@ -31,5 +31,4 @@
while (0)
310,7 → 328,7
-
+#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/linux.h gcc-5.3.0-zip/gcc/config/linux.h
--- gcc-5.3.0-original/gcc/config/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -73,10 +73,10 @@
GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
328,7 → 346,7
#define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/lm32/uclinux-elf.h gcc-5.3.0-zip/gcc/config/lm32/uclinux-elf.h
--- gcc-5.3.0-original/gcc/config/lm32/uclinux-elf.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/lm32/uclinux-elf.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/lm32/uclinux-elf.h 2015-01-05 07:33:28.000000000 -0500
@@ -67,7 +67,7 @@
%{shared:-shared} \
340,7 → 358,7
#define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS()
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/m68k/linux.h gcc-5.3.0-zip/gcc/config/m68k/linux.h
--- gcc-5.3.0-original/gcc/config/m68k/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/m68k/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/m68k/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -71,7 +71,7 @@
When the -shared link option is used a final link is not being
352,7 → 370,7
#undef LINK_SPEC
#define LINK_SPEC "-m m68kelf %{shared} \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/microblaze/linux.h gcc-5.3.0-zip/gcc/config/microblaze/linux.h
--- gcc-5.3.0-original/gcc/config/microblaze/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/microblaze/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/microblaze/linux.h 2015-05-28 10:08:19.000000000 -0400
@@ -28,7 +28,7 @@
#undef TLS_NEEDS_GOT
364,7 → 382,7
#define SUBTARGET_EXTRA_SPECS \
{ "dynamic_linker", DYNAMIC_LINKER }
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/mips/linux.h gcc-5.3.0-zip/gcc/config/mips/linux.h
--- gcc-5.3.0-original/gcc/config/mips/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/mips/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/mips/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -22,20 +22,20 @@
#define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
394,7 → 412,7
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
#define GNU_USER_DYNAMIC_LINKERN32 \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/mn10300/linux.h gcc-5.3.0-zip/gcc/config/mn10300/linux.h
--- gcc-5.3.0-original/gcc/config/mn10300/linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/mn10300/linux.h 2016-04-02 11:53:47.213604913 -0400
+++ gcc-5.3.0-zip/gcc/config/mn10300/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -32,7 +32,7 @@
#undef ASM_SPEC
406,7 → 424,7
#undef LINK_SPEC
#define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/pa/pa-linux.h gcc-5.3.0-zip/gcc/config/pa/pa-linux.h
--- gcc-5.3.0-original/gcc/config/pa/pa-linux.h 2016-03-25 11:55:15.508451270 -0400
--- gcc-5.3.0-original/gcc/config/pa/pa-linux.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/pa/pa-linux.h 2015-09-24 20:04:26.000000000 -0400
@@ -37,7 +37,7 @@
/* Define this for shared library support because it isn't in the main
418,7 → 436,7
#undef LINK_SPEC
#define LINK_SPEC "\
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/rs6000/linux64.h gcc-5.3.0-zip/gcc/config/rs6000/linux64.h
--- gcc-5.3.0-original/gcc/config/rs6000/linux64.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/rs6000/linux64.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/rs6000/linux64.h 2015-03-09 19:18:57.000000000 -0400
@@ -357,14 +357,14 @@
#undef LINK_OS_DEFAULT_SPEC
441,7 → 459,7
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif DEFAULT_LIBC == LIBC_GLIBC
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/rs6000/sysv4.h gcc-5.3.0-zip/gcc/config/rs6000/sysv4.h
--- gcc-5.3.0-original/gcc/config/rs6000/sysv4.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/rs6000/sysv4.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/rs6000/sysv4.h 2015-09-24 09:46:45.000000000 -0400
@@ -757,8 +757,8 @@
455,7 → 473,7
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/s390/linux.h gcc-5.3.0-zip/gcc/config/s390/linux.h
--- gcc-5.3.0-original/gcc/config/s390/linux.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/s390/linux.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/s390/linux.h 2015-05-11 03:14:10.000000000 -0400
@@ -60,8 +60,8 @@
#define MULTILIB_DEFAULTS { "m31" }
469,7 → 487,7
#undef LINK_SPEC
#define LINK_SPEC \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/sh/linux.h gcc-5.3.0-zip/gcc/config/sh/linux.h
--- gcc-5.3.0-original/gcc/config/sh/linux.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/sh/linux.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/sh/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -43,7 +43,7 @@
481,7 → 499,7
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/sparc/linux64.h gcc-5.3.0-zip/gcc/config/sparc/linux64.h
--- gcc-5.3.0-original/gcc/config/sparc/linux64.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/sparc/linux64.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/sparc/linux64.h 2015-01-05 07:33:28.000000000 -0500
@@ -84,8 +84,8 @@
When the -shared link option is used a final link is not being
504,7 → 522,7
%{!static: \
%{rdynamic:-export-dynamic} \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/sparc/linux.h gcc-5.3.0-zip/gcc/config/sparc/linux.h
--- gcc-5.3.0-original/gcc/config/sparc/linux.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/sparc/linux.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/sparc/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -83,7 +83,7 @@
When the -shared link option is used a final link is not being
516,7 → 534,7
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/vax/linux.h gcc-5.3.0-zip/gcc/config/vax/linux.h
--- gcc-5.3.0-original/gcc/config/vax/linux.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/vax/linux.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/vax/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -41,7 +41,7 @@
%{!shared: \
528,7 → 546,7
#undef WCHAR_TYPE
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/xtensa/linux.h gcc-5.3.0-zip/gcc/config/xtensa/linux.h
--- gcc-5.3.0-original/gcc/config/xtensa/linux.h 2016-03-25 11:55:15.512451248 -0400
--- gcc-5.3.0-original/gcc/config/xtensa/linux.h 2016-04-02 11:53:47.217604879 -0400
+++ gcc-5.3.0-zip/gcc/config/xtensa/linux.h 2015-01-05 07:33:28.000000000 -0500
@@ -44,7 +44,7 @@
%{mlongcalls:--longcalls} \
678,8 → 696,8
+
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/zip/zip.c gcc-5.3.0-zip/gcc/config/zip/zip.c
--- gcc-5.3.0-original/gcc/config/zip/zip.c 1969-12-31 19:00:00.000000000 -0500
+++ gcc-5.3.0-zip/gcc/config/zip/zip.c 2016-03-24 21:28:04.199373113 -0400
@@ -0,0 +1,2324 @@
+++ gcc-5.3.0-zip/gcc/config/zip/zip.c 2016-04-01 06:26:30.217272207 -0400
@@ -0,0 +1,2341 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Filename: zip.c
805,6 → 823,7
+static bool zip_can_eliminate(int from ATTRIBUTE_UNUSED, int to);
+static int zip_memory_move_cost(machine_mode, reg_class_t, bool);
+static rtx zip_legitimize_address(rtx x, rtx oldx, machine_mode mode);
+static bool zip_cannot_modify_jumps_p(void);
+
+
+#define ALL_DEBUG_OFF false
819,6 → 838,7
+ ZIP_BUILTIN_RESTORE_CONTEXT,
+ ZIP_BUILTIN_BITREV,
+ ZIP_BUILTIN_CC,
+ ZIP_BUILTIN_UCC,
+ ZIP_BUILTIN_MAX
+};
+
1343,7 → 1363,6
+/* Implements the macro INITIAL_ELIMINATION_OFFSET,
+ * return the OFFSET.
+ */
+/*
+int
+zip_initial_elimination_offset(int from, int to) {
+ int ret = 0;
1351,8 → 1370,11
+
+ if (((from) == FRAME_POINTER_REGNUM)&&((to) == STACK_POINTER_REGNUM)) {
+ ret = cfun->machine->sp_fp_offset;
+ } else if (((from)=ARG_POINTER_REGNUM)&&((to)==STACK_POINTER_REGNUM)) {
+ ret = cfun->machine->sp_fp_offset;
+ } else if (((from)=ARG_POINTER_REGNUM)&&((to)==FRAME_POINTER_REGNUM)) {
+ ret = cfun->machine->local_vars_size;
+ // ret = cfun->machine->local_vars_size;
+ ret = 0;
+ } else {
+ abort();
+ }
1359,7 → 1381,6
+
+ return ret;
+}
+*/
+
+/* Return non-zero if the function argument described by TYPE is to be passed
+ * by reference.
1753,6 → 1774,11
+ build_function_type_list(unsigned_type_node, NULL_TREE));
+#endif
+
+#ifdef HAVE_zip_ucc
+ def_builtin("zip_ucc", CODE_FOR_zip_ucc, ZIP_BUILTIN_UCC,
+ build_function_type_list(unsigned_type_node, NULL_TREE));
+#endif
+
+}
+
+static tree
1796,7 → 1822,7
+ if (!target)
+ target = gen_reg_rtx(SImode);
+ pat = GEN_FCN(icode)(target, op[0]);
+ } else if (code == ZIP_BUILTIN_CC) {
+ } else if ((code == ZIP_BUILTIN_CC)||(code == ZIP_BUILTIN_UCC)) {
+ if (!target)
+ target = gen_reg_rtx(SImode);
+ pat = GEN_FCN(icode)(target);
1904,6 → 1930,7
+ char buf[64];
+ sprintf(buf, "(BAD-RTX-CODE %d)", GET_CODE(x));
+ zip_debug_print(pfx, lvl, buf);
+ gcc_assert(0 && "Bad RTX Code");
+ return;
+ } switch(GET_CODE(x)) { // rtl.def
+ case PARALLEL: zip_debug_print(pfx, lvl, "(PARALLEL");
1922,6 → 1949,7
+ */
+ zip_debug_rtx_1(pfx, PATTERN(x), lvl+1);
+ zip_debug_print(pfx, lvl, ")");
+ debug_rtx(x);
+ break;
+ case JUMP_INSN: zip_debug_print(pfx, lvl, "(JUMP-INSN");
+ zip_debug_rtx_1(pfx, PATTERN(x), lvl+1);
1974,9 → 2002,10
+ } break;
+ case SET:
+ zip_debug_print_m(pfx, lvl, "(SET", GET_MODE(x));
+ zip_debug_rtx_1(pfx, XEXP(x,0),lvl+1);
+ zip_debug_rtx_1(pfx, XEXP(x,1),lvl+1);
+ zip_debug_rtx_1(pfx, SET_DEST(x),lvl+1);
+ zip_debug_rtx_1(pfx, SET_SRC(x),lvl+1);
+ zip_debug_print(pfx, lvl, ")");
+ debug_rtx(x);
+ break;
+ case REG:
+ if (REGNO(x) == zip_PC)
3004,10 → 3033,16
+
+// #warning "How do we tell the compiler LDI label is expensive as 2 ops"?
+
+static bool zip_cannot_modify_jumps_p(void) {
+ // Let's try their suggested approach, keeping us from modifying jumps
+ // after reload. This should also allow our peephole2 optimizations
+ // to adjust things back to what they need to be if necessary.
+ return (reload_completed || reload_in_progress);
+}
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/zip/zip.h gcc-5.3.0-zip/gcc/config/zip/zip.h
--- gcc-5.3.0-original/gcc/config/zip/zip.h 1969-12-31 19:00:00.000000000 -0500
+++ gcc-5.3.0-zip/gcc/config/zip/zip.h 2016-03-19 12:03:33.888255495 -0400
@@ -0,0 +1,3889 @@
+++ gcc-5.3.0-zip/gcc/config/zip/zip.h 2016-04-01 06:33:55.090614401 -0400
@@ -0,0 +1,3898 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Filename: gcc/config/zip/zip.h
4780,7 → 4815,8
+ * register elimination are things that the compiler already knows about.
+ *
+ * ZipCPU ... does the compiler know about my decision as to whether or not
+ * the frame pointer was needed? The m68k code suggests it does not ...
+ * the frame pointer was needed? Yes it does, but it's kept separately. We'll
+ * just say everything can be eliminated.
+ */
+#define TARGET_CAN_ELIMINATE zip_can_eliminate
+
4789,14 → 4825,16
+ * the specified pair of registers. This macro must be defined if
+ * ELIMINABLE_REGS is defined.
+ *
+ * ZipCPU---Is there a default we can use?
+ * ZipCPU---We had at one time set this to a default offset of 0. This didn't
+ * work. It turns out that this is not only the *initial* elimination offset,
+ * but also the offset along the way. Hence, when a variable needs to be
+ * spilled to the stack, this offset must change. Reload goes and checks for
+ * this, and adjusts registers if the offset has changed. Hence, without this,
+ * we get negative (i.e. illegal) stack offsets.
+ */
+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) (OFFSET)=0
+/*
+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
+ do { (OFFSET) = zip_initial_elimination_offset((FROM), (TO)); } \
+ while(0) \
+*/
+
+/* 17.09.06 Passing function arguments on the stack */
+
6597,8 → 6635,14
+ * would typically be reload, so thiss target hook should be defined to a
+ * function such as:
+ *
+ * ZipCPU --- I don't get what this is for.
+ * ZipCPU --- I don't get what this is for.
+ * Actually, in hind sight, ZipCPU needs this. Without this, the
+ * compiler will try to reorder basic blocks, shuffling logic around and so
+ * fortch, preventing our comparison optimizations from being used. By setting
+ * this function appropriately, we can prevent it from reversing conditions into
+ * conditions we don't support.
+ */
+#define TARGET_CANNOT_MODIFY_JUMPS_P zip_cannot_modify_jumps_p
+
+/* TARGET_BRANCH_TARGET_REGISTER_CLASS ... This target hook returns a register
+ * class for which branch target register optimizations should be applied. All
6899,8 → 6943,8
+
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/config/zip/zip.md gcc-5.3.0-zip/gcc/config/zip/zip.md
--- gcc-5.3.0-original/gcc/config/zip/zip.md 1969-12-31 19:00:00.000000000 -0500
+++ gcc-5.3.0-zip/gcc/config/zip/zip.md 2016-03-24 21:23:15.776993706 -0400
@@ -0,0 +1,1963 @@
+++ gcc-5.3.0-zip/gcc/config/zip/zip.md 2016-04-01 19:21:20.490611131 -0400
@@ -0,0 +1,2122 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; Filename: zip.md
6969,15 → 7013,16
+; Our builtin functions, by identifier
+;
+(define_constants
+ [(UNSPEC_RTU 1)
+ (UNSPEC_HALT 2)
+ (UNSPEC_IDLE 3)
+ (UNSPEC_SYSCALL 4)
+ (UNSPEC_SAVE_CONTEXT 5)
+ (UNSPEC_RESTORE_CONTEXT 6)
+ (UNSPEC_BITREV 7)
+ (UNSPEC_GETCC 8)
+ (UNSPEC_LDILO 9)
+ [(UNSPEC_RTU 1)
+ (UNSPEC_HALT 2)
+ (UNSPEC_IDLE 3)
+ (UNSPEC_SYSCALL 4)
+ (UNSPEC_SAVE_CONTEXT 5)
+ (UNSPEC_RESTORE_CONTEXT 6)
+ (UNSPEC_BITREV 7)
+ (UNSPEC_GETUCC 8)
+ (UNSPEC_GETCC 9)
+ (UNSPEC_LDILO 10)
+ ])
+;
+;
7620,8 → 7665,36
+ [(set_attr "ccresult" "set")])
+;
+;
+;(define_extract "ssadsi"
+; [(set (cc0) (compare (match_operand:SI 1 "register_operand" "+r")
+; (match_operand:SI 2 "register_operand" "+r")))
+; (cond_exec (lt (cc0) (const_int 0))
+; (set (match_dup:SI 2) (xor:SI (match_dup:SI 1) (match_dup:SI 2))))
+; (cond_exec (lt (cc0) (const_int 0))
+; (set (match_dup:SI 2) (xor:SI (match_dup:SI 2) (match_dup:SI 1))))
+; (cond_exec (lt (cc0) (const_int 0))
+; (set (match_dup:SI 2) (xor:SI (match_dup:SI 1) (match_dup:SI 2))))
+; (set (match_dup:SI 2) (subtract (match_dup:SI 1) (match_dup:SI 2)))
+; (set (match_operand:SI 3 "register_operand" "=r") (add:SI (match_dup:SI 2) (match_dup:SI 3)))
+; ]
+; "")
+;(define_expand "usadsi"
+; [(set (cc0) (compare (match_operand:SI 1 "register_operand" "+r")
+; (match_operand:SI 2 "register_operand" "+r")))
+; (cond_exec (ltu (cc0) (const_int 0))
+; (set (match_dup:SI 2) (xor:SI (match_dup:SI 1) (match_dup:SI 2))))
+; (cond_exec (ltu (cc0) (const_int 0))
+; (set (match_dup:SI 2) (xor:SI (match_dup:SI 2) (match_dup:SI 1))))
+; (cond_exec (ltu (cc0) (const_int 0))
+; (set (match_dup:SI 2) (xor:SI (match_dup:SI 1) (match_dup:SI 2))))
+; (set (match_dup:SI 2) (subtract (match_dup:SI 1) (match_dup:SI 2)))
+; (set (match_operand:SI 3 "register_operand" "=r") (add:SI (match_dup:SI 2) (match_dup:SI 3)))
+; ]
+; "")
+;
+;
+;
+;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; General arithmetic instructions -- double words
7788,6 → 7861,35
+ (popcount (match_operand:DI 1 "register_operand" "r")))
+ (set (match_dup 0) (and:SI (match_dup 0) (const_int -2)))
+ ])
+;(define_insn "extendsidi2"
+; [(set (match_operand:DI 0 "register_operand" "=r")
+; (sign_extend:DI (match_operand:SI 0 "register_operand" "r")))]
+; ""
+; "TEST\t%1\nMOV\t%1,%L0\nCLR\t%L1\nLDI.LT\t-1,%L1"
+; [(set_attr "predicable" "no") (set_attr "ccresult" "unknown")])
+;(define_insn "mulsidi3"
+; [(set (match_operand:DI 0 "register_operand" "=r")
+; (mult:SI (match_operand:SI 1 "register_operand" "%r")
+; (match_operand:SI 2 "register_operand" "r")))
+; (clobber (match_scratch:SI 3 "=r"))]
+; ; "(R0 != R1)&&(R0 != R2)&&(R0!=R3)&&(R1!=R2)&&(R1=R3)&&(R2!=R3)"
+; ""
+; "MOV %1,%L0
+; MPYS %2,%L0 ; L0 = R2 * R1
+; MOV %1,%3 ; R3 = R1
+; ROL 16,%3 ; R3 = (R1 <<< 16)
+; MPYS %2,%3 ; R3 = (R1 <<< 16) * R2
+; ROL 16,%3 ; R3 = upper bits of (R1<<<16)*R2
+; AND 0x0ffff,%3
+; ADD %3,%L0 ; L0 = L0 + R3 = L0 + (R1>>16)*R2
+; MOV %2,%3
+; ROL 16,%3
+; MPYS %1,%3
+; ROL 16,%3
+; AND 0x0ffff,%3
+; ADD %3,%0"
+; [(set_attr "predicable" "no") (set_attr "ccresult" "unknown")])
+
+;
+; Still missing DI instructions for smin:DI, smax:DI, movdicc, adddicc,
+; mult:di, div:di, divu:di
7854,8 → 7956,8
+ [(set_attr "ccresult" "set")])
+(define_insn "cmp<mode>_off"
+ [(set (cc0) (compare (match_operand:ZI 0 "register_operand" "r")
+ (plus:ZI (match_operand:ZI 1 "register_operand" "r")
+ (match_operand:ZI 2 "const_int_operand" "N"))))]
+ (plus (match_operand:ZI 1 "register_operand" "r")
+ (match_operand 2 "const_int_operand" "N"))))]
+ ""
+ "CMP\t%2+%1,%0"
+ [(set_attr "ccresult" "set")])
8128,15 → 8230,16
+ (pc)))]
+ ""
+ {
+ // extern void zip_debug_rtx(const_rtx);
+ extern void zip_debug_rtx_pfx(const char *, const_rtx);
+ //; Two branches give us no end of difficulty when implementing.
+ //; Let's check for these two branch codes, and swap the
+ //; comparison to simplify them.
+ // fprintf(stderr, "CBRANCH\n");
+ // zip_debug_rtx(operands[0]);
+ // zip_debug_rtx(operands[1]);
+ // zip_debug_rtx(operands[2]);
+ // zip_debug_rtx(operands[3]);
+ // zip_debug_rtx_pfx("- CMP: ", operands[0]);
+ // zip_debug_rtx_pfx("- A : ", operands[1]);
+ // zip_debug_rtx_pfx("- B : ", operands[2]);
+ // zip_debug_rtx_pfx("- JMP: ", operands[3]);
+ //; Can we do better if we reverse some compares?
+ if ((GET_CODE(operands[0])==GTU)&&(REG_P(operands[2]))) {
+ // fprintf(stderr, "CBRANCH:(GTU,?,REG,?)\n");
+ emit_insn(gen_rtx_SET(VOIDmode, cc0_rtx,
8149,6 → 8252,13
+ gen_rtx_COMPARE(VOIDmode, operands[2], operands[1])));
+ emit_jump_insn(gen_cbranch_jmp_leu(operands[3]));
+ DONE;
+ } else if ((GET_CODE(operands[0])==LE)&&(REG_P(operands[2]))) {
+ // fprintf(stderr, "CBRANCH:(LE,?,REG,?)\n");
+ //; Swap operands, turn into a GTE compare
+ emit_insn(gen_rtx_SET(VOIDmode, cc0_rtx,
+ gen_rtx_COMPARE(VOIDmode, operands[2], operands[1])));
+ emit_jump_insn(gen_cbranch_jmp_ge(operands[3]));
+ DONE;
+ } // ; Otherwise ... just handle the branch normally
+
+ //; Except ... we can do better for some instructions, such as
8158,7 → 8268,7
+ //;
+ if ((GET_CODE(operands[0])==LE)
+ &&(CONST_INT_P(operands[2]))
+ &&(INTVAL(operands[2])>(1<<17)-2)) {
+ &&(INTVAL(operands[2])<(1<<17)-2)) {
+ // fprintf(stderr, "CBRANCH:(LE,?,#,?)\n");
+ emit_insn(gen_rtx_SET(VOIDmode, cc0_rtx,
+ gen_rtx_COMPARE(VOIDmode, operands[1],
8529,18 → 8639,19
+;
+; Operator "save_context"
+;
+; operand 0 missing output reload ... ?
+; Okay, so we're not really reading and writing operand 0, %0, however
+; if we don't list it as a "+r" register, the compiler may allocate it
+; among the other registers, thus we clobber it in the middle of the
+; operation before the task is complete.
+;
+(define_insn "zip_save_context"
+ [(parallel [
+ (unspec_volatile
+ [ (match_operand:SI 0 "register_operand" "r") ]
+ [(unspec_volatile
+ [ (match_operand:SI 0 "register_operand" "+r") ]
+ UNSPEC_SAVE_CONTEXT)
+ (clobber (match_scratch:SI 1 "=r"))
+ (clobber (match_scratch:SI 2 "=r"))
+ (clobber (match_scratch:SI 3 "=r"))
+ (clobber (match_scratch:SI 4 "=r"))
+ (use (match_dup 0))])]
+ (clobber (match_scratch:SI 4 "=r"))]
+ "(!ZIP_USER)"
+ "MOV\tuR0,%1
+ MOV\tuR1,%2
8575,18 → 8686,18
+ STO\t%3,14(%0)
+ STO\t%4,15(%0)"
+ [(set_attr "predicable" "no") (set_attr "ccresult" "unknown")])
+;
+; See the comment above about why operand 0, %0, *must* be a "+r" operand,
+; even though we don't really read (or change) its value throughout this
+; operation.
+;
+(define_insn "zip_restore_context"
+ [(unspec_volatile [
+ (match_operand:SI 0 "register_operand" "r")] UNSPEC_RESTORE_CONTEXT)
+ ; (match_scratch:SI 1 "r")
+ ; (match_scratch:SI 2 "r")
+ ; (match_scratch:SI 3 "r")
+ ; (match_scratch:SI 4 "r")] 6)
+ (match_operand:SI 0 "register_operand" "+r")] UNSPEC_RESTORE_CONTEXT)
+ (clobber (match_scratch:SI 1 "=r"))
+ (clobber (match_scratch:SI 2 "=r"))
+ (clobber (match_scratch:SI 3 "=r"))
+ (clobber (match_scratch:SI 4 "=r"))
+ (use (match_dup 0))]
+ (clobber (match_scratch:SI 4 "=r"))]
+ "(!ZIP_USER)"
+ "LOD\t0(%0),%1
+ LOD\t1(%0),%2
8634,9 → 8745,15
+ ""
+ "MOV\tCC,%0"
+ [(set_attr "ccresult" "unchanged")])
+(define_insn "zip_ucc"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec_volatile:SI [(reg:SI CC_REG)] UNSPEC_GETUCC))]
+ ""
+ "MOV\tuCC,%0"
+ [(set_attr "ccresult" "unchanged")])
+(define_insn "zip_cc_sto"
+ [(set (mem:SI (match_operand:SI 0 "register_operand" "r"))
+ (unspec:SI [(reg:SI CC_REG)] UNSPEC_GETCC))]
+ (unspec_volatile:SI [(reg:SI CC_REG)] UNSPEC_GETCC))]
+ ""
+ "STO\tCC,(%0)"
+ [(set_attr "ccresult" "unchanged")])
8644,7 → 8761,7
+ [(set (mem:SI (plus:SI
+ (match_operand:SI 0 "register_operand" "r")
+ (match_operand:SI 1 "const_int_operand" "N")))
+ (unspec:SI [(reg:SI CC_REG)] UNSPEC_GETCC))]
+ (unspec_volatile:SI [(reg:SI CC_REG)] UNSPEC_GETCC))]
+ ""
+ "STO\tCC,%1(%0)"
+ [(set_attr "ccresult" "unchanged")])
8856,7 → 8973,93
+; BV %2"
+; "")
+
+(define_peephole2
+ [(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
+ (match_operand:SI 1 "register_operand" "")))
+ (set (pc) (if_then_else (gtu (cc0) (const_int 0))
+ (label_ref (match_operand 2 "" ""))
+ (pc)))]
+ ""
+ [(set (cc0) (compare (match_dup 1) (match_dup 0)))
+ (set (pc) (if_then_else (ltu (cc0) (const_int 0))
+ (label_ref (match_dup 2))
+ (pc)))]
+ "")
+(define_peephole2
+ [(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
+ (match_operand:SI 1 "register_operand" "")))
+ (set (pc) (if_then_else (geu (cc0) (const_int 0))
+ (label_ref (match_operand 2 "" ""))
+ (pc)))]
+ ""
+ [(set (cc0) (compare (match_dup 1) (plus (match_dup 0) (const_int 1))))
+ (set (pc) (if_then_else (ltu (cc0) (const_int 0))
+ (label_ref (match_dup 2))
+ (pc)))]
+ "")
+(define_peephole2
+ [(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
+ (match_operand:SI 1 "register_operand" "")))
+ (set (pc) (if_then_else (ge (cc0) (const_int 0))
+ (label_ref (match_operand 2 "" ""))
+ (pc)))]
+ ""
+ [(set (cc0) (compare (match_dup 1) (match_dup 0)))
+ (set (pc) (if_then_else (le (cc0) (const_int 0))
+ (label_ref (match_dup 2))
+ (pc)))]
+ "")
+(define_peephole2
+ [(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
+ (match_operand:SI 1 "register_operand" "")))
+ (set (pc) (if_then_else (leu (cc0) (const_int 0))
+ (label_ref (match_operand 2 "" ""))
+ (pc)))]
+ ""
+ [(set (cc0) (compare (match_dup 0) (plus (match_dup 1) (const_int 1))))
+ (set (pc) (if_then_else (ltu (cc0) (const_int 0))
+ (label_ref (match_dup 2))
+ (pc)))]
+ "")
+;
+; I need to revisit these peephole optimizations when I can come up with another
+; way of adding one to the constant integer. The approach listed below just
+; ... doesn't work.
+;
+;(define_peephole2
+; [(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
+; (match_operand:SI 1 "const_int_operand" "")))
+; (set (pc) (if_then_else (le (cc0) (const_int 0))
+; (label_ref (match_operand 2 "" ""))
+; (pc)))]
+; "(INTVAL(operands[1])<((1<<17)-2))"
+; [(set (cc0) (compare (match_dup 0) (plus (match_dup 1) (const_int 1))))
+; (set (pc) (if_then_else (lt (cc0) (const_int 0))
+; (label_ref (match_dup 2))
+; (pc)))]
+; "")
+;(define_peephole2
+; [(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
+; (match_operand:SI 1 "const_int_operand" "")))
+; (set (pc) (if_then_else (leu (cc0) (const_int 0))
+; (label_ref (match_operand 2 "" ""))
+; (pc)))]
+; "(INTVAL(operands[1])<((1<<17)-2))"
+; [(set (cc0) (compare (match_dup 0) (plus (match_dup 1) (const_int 1))))
+; (set (pc) (if_then_else (lt (cc0) (const_int 0))
+; (label_ref (match_dup 2))
+; (pc)))]
+; "")
+;
+;
+;
+; Need a peephole optimizer (not peephole2) for
+; [(call ...
+; (set (pc) (label))]
+; To result with
+; "MOV\tlabel,R0
+; JMP\tsubroutine"
+;
+; STILL MISSING:
+; SYSCALL(ID)
+; MOV %ID,R0
9336,6 → 9539,52
+
+./include/gcc-common.texi:11: ==> Fatal error occurred, no output PDF file pro
+duced!
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/emit-rtl.c gcc-5.3.0-zip/gcc/emit-rtl.c
--- gcc-5.3.0-original/gcc/emit-rtl.c 2015-08-05 07:20:59.000000000 -0400
+++ gcc-5.3.0-zip/gcc/emit-rtl.c 2016-04-01 06:40:42.812171791 -0400
@@ -81,6 +81,15 @@
#include "builtins.h"
#include "rtl-iter.h"
+// #define DO_ZIP_DEBUGS
+#include <stdio.h>
+#ifdef DO_ZIP_DEBUGS
+#define ZIP_DEBUG_LINE(STR,RTX) do { fprintf(stderr, "%s:%d/%s\n",__FILE__,__LINE__,STR); zip_debug_rtx(RTX); } while(0)
+extern void zip_debug_rtx(const_rtx);
+#else
+#define ZIP_DEBUG_LINE(STR,RTX)
+#endif
+
struct target_rtl default_target_rtl;
#if SWITCHABLE_TARGET
struct target_rtl *this_target_rtl = &default_target_rtl;
@@ -2925,6 +2934,8 @@
int copied = 0;
int length;
+ZIP_DEBUG_LINE("Copy RTX if shared",*orig1);
+
/* Repeat is used to turn tail-recursion into iteration. */
repeat:
x = *orig1;
@@ -2979,6 +2990,8 @@
break;
}
+ZIP_DEBUG_LINE("Before RTX_FLAG",x);
+
/* This rtx may not be shared. If it has already been seen,
replace it with a copy of itself. */
@@ -2989,6 +3002,8 @@
}
RTX_FLAG (x, used) = 1;
+ZIP_DEBUG_LINE("Post RTX_FLAG",x);
+
/* Now scan the subexpressions recursively.
We can store any replaced subexpressions directly into X
since we know X is not shared! Any vectors in X
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/expr.c gcc-5.3.0-zip/gcc/expr.c
--- gcc-5.3.0-original/gcc/expr.c 2015-04-07 10:34:06.000000000 -0400
+++ gcc-5.3.0-zip/gcc/expr.c 2016-03-08 04:07:01.426335724 -0500
9350,7 → 9599,7
enum expand_modifier modifier, rtx *alt_rtl,
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/final.c gcc-5.3.0-zip/gcc/final.c
--- gcc-5.3.0-original/gcc/final.c 2015-01-15 08:28:42.000000000 -0500
+++ gcc-5.3.0-zip/gcc/final.c 2016-03-24 22:12:00.263845620 -0400
+++ gcc-5.3.0-zip/gcc/final.c 2016-03-29 08:41:03.919647461 -0400
@@ -109,6 +109,14 @@
#include "wide-int-print.h"
#include "rtl-iter.h"
9457,6 → 9706,41
print_closer ();
}
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/jump.c gcc-5.3.0-zip/gcc/jump.c
--- gcc-5.3.0-original/gcc/jump.c 2015-01-27 04:19:30.000000000 -0500
+++ gcc-5.3.0-zip/gcc/jump.c 2016-04-01 06:41:10.724002408 -0400
@@ -80,6 +80,14 @@
#include "target.h"
#include "rtl-iter.h"
+// #define DO_ZIP_DEBUGS
+#ifdef DO_ZIP_DEBUGS
+#include <stdio.h>
+#define ZIP_DEBUG_LINE(STR,RTX) do{fprintf(stderr,"%s:%d/%s\n",__FILE__,__LINE__,STR); zip_debug_rtx(RTX); }while(0)
+extern void zip_debug_rtx(const_rtx);
+#else
+#define ZIP_DEBUG_LINE(STR,RTX)
+#endif
/* Optimize jump y; x: ... y: jumpif... x?
Don't know if it is worth bothering with. */
/* Optimize two cases of conditional jump to conditional jump?
@@ -1136,6 +1144,7 @@
int i;
const char *fmt;
+ZIP_DEBUG_LINE("Mark jump label",insn);
switch (code)
{
case PC:
@@ -1248,6 +1257,8 @@
break;
}
+ZIP_DEBUG_LINE("Post case",insn);
+
fmt = GET_RTX_FORMAT (code);
/* The primary target of a tablejump is the label of the ADDR_VEC,
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/machmode.def gcc-5.3.0-zip/gcc/machmode.def
--- gcc-5.3.0-original/gcc/machmode.def 2015-01-05 07:33:28.000000000 -0500
+++ gcc-5.3.0-zip/gcc/machmode.def 2016-03-08 11:56:45.375491523 -0500
9699,6 → 9983,97
return apply_change_group ();
}
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/recog.c gcc-5.3.0-zip/gcc/recog.c
--- gcc-5.3.0-original/gcc/recog.c 2015-03-20 02:07:30.000000000 -0400
+++ gcc-5.3.0-zip/gcc/recog.c 2016-03-29 08:44:33.142234843 -0400
@@ -68,6 +68,15 @@
#include "df.h"
#include "insn-codes.h"
+// #define DO_ZIP_DEBUGS
+#ifdef DO_ZIP_DEBUGS
+extern void zip_debug_rtx(const_rtx);
+#define ZIP_DEBUG_LINE(STR,RTX) do { fprintf(stderr, "%s:%d/%s\n", __FILE__,__LINE__,STR); zip_debug_rtx(RTX); } while(0)
+#else
+#define ZIP_DEBUG_LINE(STR,RTX)
+#endif
+
+
#ifndef STACK_PUSH_CODE
#ifdef STACK_GROWS_DOWNWARD
#define STACK_PUSH_CODE PRE_DEC
@@ -3671,7 +3680,6 @@
break;
/* The buffer filled to the current maximum, so try to match. */
-
pos = peep2_buf_position (peep2_current + peep2_current_count);
peep2_insn_data[pos].insn = PEEP2_EOB;
COPY_REG_SET (peep2_insn_data[pos].live_before, live);
@@ -3704,6 +3712,7 @@
rebuild_jump_labels (get_insns ());
if (peep2_do_cleanup_cfg)
cleanup_cfg (CLEANUP_CFG_CHANGED);
+
}
#endif /* HAVE_peephole2 */
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/reload1.c gcc-5.3.0-zip/gcc/reload1.c
--- gcc-5.3.0-original/gcc/reload1.c 2015-01-15 08:28:42.000000000 -0500
+++ gcc-5.3.0-zip/gcc/reload1.c 2016-04-01 06:34:13.138506735 -0400
@@ -72,6 +72,14 @@
#include "dumpfile.h"
#include "rtl-iter.h"
+// #define DO_ZIP_DEBUGS
+#ifdef DO_ZIP_DEBUGS
+extern void zip_debug_rtx(const_rtx);
+#define ZIP_DEBUG_LINE(STR,RTX) do { fprintf(stderr, "%s:%d/%s\n", __FILE__,__LINE__,STR); zip_debug_rtx(RTX); } while(0)
+#else
+#define ZIP_DEBUG_LINE(STR,RTX)
+#endif
+
/* This file contains the reload pass of the compiler, which is
run after register allocation has been done. It checks that
each insn is valid (operands required to be in registers really
@@ -794,6 +802,18 @@
basic_block bb;
bool inserted;
+#ifdef DO_ZIP_DEBUGS
+ {
+ int total_count = 0, current_count = 0;
+ for (insn = first; insn; insn = NEXT_INSN (insn))
+ total_count++;
+ for (insn = first; insn; insn = NEXT_INSN (insn)) {
+ fprintf(stderr, "B %3d/%3d", current_count++, total_count);
+ zip_debug_rtx(insn);
+ }
+ }
+#endif
+
/* Make sure even insns with volatile mem refs are recognizable. */
init_recog ();
@@ -1366,6 +1386,18 @@
reload_completed = !failure;
+#ifdef DO_ZIP_DEBUGS
+ {
+ int total_count = 0, current_count = 0;
+ for (insn = first; insn; insn = NEXT_INSN (insn))
+ total_count++;
+ for (insn = first; insn; insn = NEXT_INSN (insn)) {
+ fprintf(stderr, "A %3d/%3d", current_count++, total_count);
+ zip_debug_rtx(insn);
+ }
+ }
+#endif
+
return need_dce;
}
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/reload.c gcc-5.3.0-zip/gcc/reload.c
--- gcc-5.3.0-original/gcc/reload.c 2015-01-15 08:28:42.000000000 -0500
+++ gcc-5.3.0-zip/gcc/reload.c 2016-03-19 12:28:30.592811127 -0400
9834,12 → 10209,12
}
diff -Naur '--exclude=*.swp' gcc-5.3.0-original/gcc/var-tracking.c gcc-5.3.0-zip/gcc/var-tracking.c
--- gcc-5.3.0-original/gcc/var-tracking.c 2015-03-26 09:19:00.000000000 -0400
+++ gcc-5.3.0-zip/gcc/var-tracking.c 2016-03-19 09:31:12.636242911 -0400
+++ gcc-5.3.0-zip/gcc/var-tracking.c 2016-03-31 18:55:03.584197958 -0400
@@ -143,6 +143,13 @@
#include "rtl-iter.h"
#include "fibonacci_heap.h"
+#ifdef DO_ZIP_DEBUG
+#ifdef DO_ZIP_DEBUGS
+#include <stdio.h>
+extern void zip_debug_rtx(const_rtx);
+#define ZIP_DEBUG_LINE(STR,RTX) do {fprintf(stderr,"%s:%d/%s\n",__FILE__,__LINE__,STR); zip_debug_rtx(RTX); } while(0)

powered by: WebSVN 2.1.0

© copyright 1999-2022 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.