URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
Compare Revisions
- This comparison shows the changes necessary to convert path
/zipcpu/trunk/sw
- from Rev 206 to Rev 209
- ↔ Reverse comparison
Rev 206 → Rev 209
/.gitignore
10,3 → 10,6
newlib-2.5.0/ |
newlib-2.5.0-zip/ |
2017*.patch |
lib/ |
zipos/ |
zlibc/ |
/Makefile
1,69 → 1,75
################################################################################ |
# |
# Filename: Makefile |
# |
# Project: Zip CPU -- a small, lightweight, RISC CPU soft core |
# |
# Purpose: This makefile attempts to build the ZipCPU toolchain. This |
# includes binutils and GCC. (Eventually, it will include the |
# standard library as well ...) Configuration options for binutils, GCC, |
# and newlib can be found (and set) in the gas-script.sh, gcc-script.sh, |
# and nlib-script.sh files respectively. |
# |
# Targets: |
# |
# make all: |
# Includes the install target, but also the pdf documentation |
# files that come with binutils and gcc. Building this target |
# will require a LaTeX distribution in addition to the needs of |
# the other targets. Since the PDFs can be found on line, |
# building them is not really necessary, but may be quite useful. |
# |
# make install |
# Attempts to build binutils, gcc, and newlib, and to install |
# them into the local install directory. |
# |
# This is the default target |
# |
# make binutils |
# make gcc |
# make newlib |
# Builds the respective packages |
# |
# make binutils-install |
# make gcc-install |
# make newlib-install |
# Installs the respective packages into the install directory, |
# building them first if necessary. |
# |
# make clean |
# Removes all build products--to include the source directories |
# that are built from patched tarballs. |
# |
# |
# Creator: Dan Gisselquist, Ph.D. |
# Gisselquist Technology, LLC |
# |
## |
## Filename: Makefile |
## |
## Project: Zip CPU -- a small, lightweight, RISC CPU soft core |
## |
## Purpose: This makefile attempts to build the ZipCPU toolchain. This |
## includes binutils and GCC. (Eventually, it will include the |
## standard library as well ...) Configuration options for binutils, GCC, |
## and newlib can be found (and set) in the gas-script.sh, gcc-script.sh, |
## and nlib-script.sh files respectively. |
## |
## Targets: |
## |
## make all: |
## Includes the install target, but also the pdf documentation |
## files that come with binutils and gcc. Building this target |
## will require a LaTeX distribution in addition to the needs of |
## the other targets. Since the PDFs can be found on line, |
## building them is not really necessary, but may be quite useful. |
## |
## make install |
## Attempts to build binutils, gcc, and newlib, and to install |
## them into the local install directory. |
## |
## This is the default target |
## |
## make binutils |
## make gcc |
## make newlib |
## Builds the respective packages |
## |
## make binutils-install |
## make gcc-install |
## make newlib-install |
## Installs the respective packages into the install directory, |
## building them first if necessary. |
## |
## make clean |
## Removes all build products--to include the source directories |
## that are built from patched tarballs. |
## |
## |
## Creator: Dan Gisselquist, Ph.D. |
## Gisselquist Technology, LLC |
## |
################################################################################ |
# |
# Copyright (C) 2015-2017, Gisselquist Technology, LLC |
# |
# This program is free software (firmware): 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 MERCHANTIBILITY or |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
# for more details. |
# |
# License: GPL, v3, as defined and found on www.gnu.org, |
# http://www.gnu.org/licenses/gpl.html |
# |
# |
## |
## Copyright (C) 2015-2017, Gisselquist Technology, LLC |
## |
## This program is free software (firmware): 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 MERCHANTIBILITY 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. (It's in the $(ROOT)/doc directory. Run make with no |
## target there if the PDF file isn't present.) If not, see |
## <http://www.gnu.org/licenses/> for a copy. |
## |
## License: GPL, v3, as defined and found on www.gnu.org, |
## http://www.gnu.org/licenses/gpl.html |
## |
## |
################################################################################ |
# |
## |
## |
.PHONY: all basic-install install build |
install: basic-install |
all: basic-install binutils-pdf-install gcc-pdf-install |
71,17 → 77,19
build: gas gcc-all nlib |
CC: gcc |
|
BINUTILSD=binutils-2.27 |
GCCD=gcc-6.2.0 |
NLIBD=newlib-2.5.0 |
INSTALL=`pwd`/install |
PDFD=$(INSTALL)/usr/doc |
BINUTILSD:=binutils-2.27 |
GCCD:=gcc-6.2.0 |
NLIBD:=newlib-2.5.0 |
export INSTALLD:=$(shell pwd)/install |
export PATH:=$(PATH):$(INSTALLD)/cross-tools/bin |
PDFD=$(INSTALLD)/usr/doc |
ZASMD=zasm |
BUILDGASD=build-gas |
BUILDGCCD=build-gcc |
BUILDNLIB=build-nlib |
SUBMAKE=$(MAKE) --no-print-directory |
ZIPINCD=$(INSTALL)/cross-tools/zip/include |
BUILDGASD:=build-gas |
BUILDGCCD:=build-gcc |
BUILDNLIB:=build-nlib |
TARGETGCC:=$(INSTALL)/cross-tools/bin/zip-gcc |
SUBMAKE:=$(MAKE) --no-print-directory |
ZIPINCD=$(INSTALLD)/cross-tools/zip/include |
|
$(BINUTILSD)-zip/nonce.txt: $(BINUTILSD).tar.bz2 gas-zippatch.patch |
rm -rf $(BINUTILSD)-zip/ |
97,25 → 105,32
.PHONY: binutils |
binutils: $(BUILDGASD)/nonce.txt |
$(SUBMAKE) --directory=$(BUILDGASD) |
@echo "Binutils package build complete" |
|
.PHONY: binutils-install |
binutils-install: binutils |
$(SUBMAKE) --directory=$(BUILDGASD) install |
cp ../bench/zipsim.ld install/cross-tools/zip/lib/ldscripts |
bash -c "if [[ ! -f $(BUILDGASD)/install-nonce.txt ]]; then touch $(BUILDGASD)/install-nonce.txt; fi" |
@echo "Binutils installed" |
|
.PHONY: binutils-pdf |
binutils-pdf: binutils |
$(SUBMAKE) --directory=$(BUILDGASD) pdf |
@echo "Binutils pdfs made" |
|
$(PDFD)/: |
bash -c "if [[ ! -d $(PDFD) ]]; then mkdir -p $(PDFD); fi" |
.PHONY: pdfd |
pdfd: |
$(mk-pdfd) |
|
.PHONY: |
pdfd: $(PDFD)/ |
define mk-pdfd |
@bash -c "if [[ ! -d $(PDFD) ]]; then mkdir -p $(PDFD); fi" |
endef |
|
.PHONY: binutils-pdf-install |
binutils-pdf-install: binutils-pdf $(PDFD)/ |
binutils-pdf-install: binutils-pdf pdfd |
find $(BUILDGASD) -name "*.pdf" -exec cp \{\} $(PDFD)/ \; |
@echo "Binutils pdfs installed" |
|
.PHONY: gas |
gas: binutils |
123,6 → 138,9
.PHONY: gas-install |
gas-install: binutils-install |
|
$(BUILDGASD)/install-nonce.txt: binutils-install |
|
|
# We can also set the environment variable DEJAGNU to point to our site .exp |
# file. |
gas-check: binutils-install |
132,6 → 150,7
# Now let's try the same thing for GCC |
# |
# |
$(GCCD)-zip/nonce.txt: $(BUILDGASD)/install-nonce.txt |
$(GCCD)-zip/nonce.txt: $(GCCD).tar.bz2 gcc-zippatch.patch |
rm -rf $(GCCD)-zip/ |
tar -xjf ./$(GCCD).tar.bz2 --transform s,$(GCCD),$(GCCD)-zip, |
145,7 → 164,8
$(GCCD)-zip/gcc/config/zip/zip-ops.md: genzipops |
./genzipops $@ |
|
$(BUILDGCCD)/nonce.txt: $(GCCD)-zip/nonce.txt $(GCCD)-zip/gcc/config/zip/zip-ops.md gas-install |
$(BUILDGCCD)/nonce.txt: $(BUILDGASD)/install-nonce.txt |
$(BUILDGCCD)/nonce.txt: $(GCCD)-zip/nonce.txt $(GCCD)-zip/gcc/config/zip/zip-ops.md |
bash -c "if [[ ! -e $(BUILDGCCD) ]]; then bash gcc-script.sh; fi" |
touch $(BUILDGCCD)/nonce.txt |
|
158,19 → 178,23
# |
gcc-host: $(BUILDGCCD)/nonce.txt |
+$(SUBMAKE) --directory=$(BUILDGCCD) all-host |
@echo "GCC package build complete" |
.PHONY: zip-gcc |
zip-gcc: gcc-host |
|
gcc-install-host: $(BUILDGCCD)/nonce.txt gcc-host |
+$(SUBMAKE) --directory=$(BUILDGCCD) install-host |
@bash -c "if [[ ! -f $(BUILDGCCD)/install-nonce.txt ]]; then touch $(BUILDGCCD)/install-nonce.txt; fi" |
@echo "GCC package installed" |
|
.PHONY: zip-gcc-install |
zip-gcc-install: gcc-install-host |
|
$(INSTALL)/cross-tools/bin/zip-gcc: zip-gcc-install |
$(INSTALLD)/cross-tools/bin/zip-gcc: zip-gcc-install |
$(BUILDGCCD)/install-nonce.txt: zip-gcc-install |
|
$(INSTALL)/cross-tools/bin/zip-cc: zip-gcc-install |
bash -c "cd $(INSTALL)/cross-tools/bin; if [[ ! -e zip-cc ]]; then ln -s zip-gcc zip-cc; fi" |
$(INSTALLD)/cross-tools/bin/zip-cc: zip-gcc-install |
bash -c "cd $(INSTALLD)/cross-tools/bin; if [[ ! -e zip-cc ]]; then ln -s zip-gcc zip-cc; fi" |
|
.PHONY: gcc-pdf-install |
# |
180,19 → 204,24
# |
# |
.PHONY: gcc |
gcc: $(BUILDGCCD)/nonce.txt gas-install newlib-install |
gcc: $(BUILDGASD)/install-nonce.txt |
gcc: $(BUILDNLIB)/install-nonce.txt |
gcc: $(BUILDGCCD)/nonce.txt |
+$(SUBMAKE) --directory=$(BUILDGCCD) |
|
.PHONY: gcc-install |
gcc-install: gcc |
+$(SUBMAKE) --directory=$(BUILDGCCD) install |
@echo "GCC installed" |
|
.PHONY: gcc-pdf |
gcc-pdf: $(BUILDGCCD)/nonce.txt |
+$(SUBMAKE) --directory=$(BUILDGCCD) pdf |
@echo "GCC documentation built" |
|
gcc-pdf-install: gcc-pdf $(PDFD)/ |
find $(BUILDGCCD) -name "*.pdf" -exec cp \{\} $(PDFD)/ \; |
@echo "GCC documentation/pdfs installed" |
|
# |
# |
199,6 → 228,7
# And repeat for newlib |
# |
# |
$(NLIBD)-zip/nonce.txt: $(BUILDGCCD)/install-nonce.txt |
$(NLIBD)-zip/nonce.txt: $(NLIBD).tar.gz nlib-zippatch.patch |
rm -rf $(NLIBD)-zip/ |
tar -xzf ./$(NLIBD).tar.gz --transform s,$(NLIBD),$(NLIBD)-zip, |
211,13 → 241,17
touch $(BUILDNLIB)/nonce.txt |
|
.PHONY: newlib |
newlib: $(BUILDNLIB)/nonce.txt zip-gcc-install |
newlib: $(INSTALL)/cross-tools/bin/zip-cc |
newlib: $(BUILDGCCD)/install-nonce.txt |
newlib: $(BUILDNLIB)/nonce.txt |
newlib: $(INSTALLD)/cross-tools/bin/zip-cc |
+$(SUBMAKE) --directory=$(BUILDNLIB) |
@echo "Newlib build complete" |
|
.PHONY: newlib-install |
newlib-install: newlib |
+$(SUBMAKE) --directory=$(BUILDNLIB) install |
@bash -c "if [[ ! -f $(BUILDNLIB)/install-nonce.txt ]]; then touch $(BUILDNLIB)/install-nonce.txt; fi" |
@echo "Newlib installed" |
|
|
# Some abbreviations for targets |
224,6 → 258,7
.PHONY: nlib nlib-install |
nlib: newlib |
nlib-install: newlib-install |
$(BUILDNLIB)/install-nonce.txt: newlib-install |
|
# |
# |
243,7 → 278,7
# |
.PHONY: clean |
clean: |
rm -rf $(INSTALL) |
rm -rf $(INSTALLD)/cros-tools/bin/zip-* |
rm -rf $(BINUTILSD)-zip/ $(GCCD)-zip/ $(NLIBD)-zip/ |
rm -rf $(BUILDGASD) $(BUILDGCCD) $(BUILDNLIB) |
# $(SUBMAKE) --no-print-directory --directory=$(ZASMD) clean |
/README.md
0,0 → 1,49
This directory contains the source code for the ZipCPU tool-chain--the |
GCC back end, assembler, and linker. The directory also has the patches |
necessary to build the C-library, newlib. This tool-chain is kept in a series |
of patch files--primarily because I found the patch files for the eco32 |
CPU *very* helpful to me when I needed to know where to start when building |
the back end for the ZipCPU. |
|
You'll also find within this directory the [Makefile](Makefile) used to |
direct the build of this tool-chain, together with basic scripts for building |
[GCC](gcc-script.sh), [binutils](gas-script.sh), and [newlib](nlib-script.sh). |
|
If you run into trouble building these components, know this: the |
[Makefile](Makefile) works off of the existence of nonce.txt files to know |
how to proceed from one step to the next. Hence, as an example, when building |
the binutils components, it will start by applying patches to the binutils |
repository found within here. Once completed, it will place a nonce.txt |
file into the resulting (patched) directory. It will then attempt to |
configure binutils. Once done, there will be a `build-gas` directory with |
a `nonce.txt` file within it. This will be `make`s indication to move forward |
and build the compiler. If you have any problems with building, or if you want |
to start the build over, feel free to either remove the patched directories, |
or even to just remove the (empty) `nonce.txt` files and have `make` |
start over. |
|
## Common problems building the toolchain |
|
The most common problem people have had is the result of not having the |
pre-requisites properly installed on your computer. Sadly, in this case, |
the makefile will exit with some confusing error. You'll need to find the |
`config.log` file of the component that didn't build to find out what is |
missing. |
|
Another common error is that GCC needs the cross-built GCC to build it's |
libraries. Hence, you may need to make certain that the install'ed binary |
directory is in your path. I've tried to clean this up so that the |
tool-chain Makefile doesn't require this, but certainly the builds of any |
assembly or C related files will require it. |
|
## Installed location |
|
Currently, the tool-chain as configured does not install into your system |
directories, but rather into an `install` directory that will be built as a |
subset of this one. This behavior is controlled by the `prefix` flags within |
the various build scripts, which in turn is set by a Makefile variable. |
Should you wish to change this behavior, just remember that the install |
to the system directory will require sys-admin privileges, and it may also |
require you to build the various components manually rather than via the |
make script. (It's not something I've tested.) |
|
/gas-script.sh
50,7 → 50,11
set -e |
CLFS_HOST=$MACHTYPE |
CLFS_TARGET="zip" |
INSTALL_BASE=`pwd`/install |
if [[ -z "$INSTALLD" ]] |
then |
INSTALLD=`pwd`/install |
fi |
INSTALL_BASE=${INSTALLD} |
mkdir -p ${INSTALL_BASE}/cross-tools |
mkdir -p build-gas |
echo ../$VERSION-zip/configure |
/gas-zippatch.patch
1,5 → 1,5
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/archures.c binutils-2.27-zip/bfd/archures.c |
--- binutils-2.27/bfd/archures.c 2016-08-03 03:36:50.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/archures.c binutils-2.27-zip/bfd/archures.c |
--- binutils-2.27-original/bfd/archures.c 2016-08-03 03:36:50.000000000 -0400 |
+++ binutils-2.27-zip/bfd/archures.c 2017-01-04 14:22:45.000000000 -0500 |
@@ -525,6 +525,8 @@ |
.#define bfd_mach_nios2r2 2 |
26,8 → 26,8
#endif |
0 |
}; |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/bfd-in2.h binutils-2.27-zip/bfd/bfd-in2.h |
--- binutils-2.27/bfd/bfd-in2.h 2016-08-03 03:36:50.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/bfd-in2.h binutils-2.27-zip/bfd/bfd-in2.h |
--- binutils-2.27-original/bfd/bfd-in2.h 2016-08-03 03:36:50.000000000 -0400 |
+++ binutils-2.27-zip/bfd/bfd-in2.h 2017-01-04 22:04:11.000000000 -0500 |
@@ -2336,6 +2336,8 @@ |
#define bfd_mach_nios2r2 2 |
61,8 → 61,8
BFD_RELOC_UNUSED }; |
|
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/config.bfd binutils-2.27-zip/bfd/config.bfd |
--- binutils-2.27/bfd/config.bfd 2016-08-03 03:36:50.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/config.bfd binutils-2.27-zip/bfd/config.bfd |
--- binutils-2.27-original/bfd/config.bfd 2016-08-03 03:36:50.000000000 -0400 |
+++ binutils-2.27-zip/bfd/config.bfd 2016-12-31 17:11:00.961307172 -0500 |
@@ -1742,6 +1742,10 @@ |
targ_underscore=yes |
75,8 → 75,8
*-*-ieee*) |
targ_defvec=ieee_vec |
;; |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/configure binutils-2.27-zip/bfd/configure |
--- binutils-2.27/bfd/configure 2016-08-03 04:33:36.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/configure binutils-2.27-zip/bfd/configure |
--- binutils-2.27-original/bfd/configure 2016-08-03 04:33:36.000000000 -0400 |
+++ binutils-2.27-zip/bfd/configure 2016-12-31 17:12:22.360697343 -0500 |
@@ -14542,6 +14542,7 @@ |
xtensa_elf32_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; |
96,8 → 96,8
esac |
|
case "$COREFILE" in |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/configure.ac binutils-2.27-zip/bfd/configure.ac |
--- binutils-2.27/bfd/configure.ac 2016-08-03 03:36:50.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/configure.ac binutils-2.27-zip/bfd/configure.ac |
--- binutils-2.27-original/bfd/configure.ac 2016-08-03 03:36:50.000000000 -0400 |
+++ binutils-2.27-zip/bfd/configure.ac 2016-12-31 17:13:38.600136486 -0500 |
@@ -717,6 +717,7 @@ |
xtensa_elf32_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; |
117,8 → 117,8
esac |
|
case "$COREFILE" in |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/cpu-zip.c binutils-2.27-zip/bfd/cpu-zip.c |
--- binutils-2.27/bfd/cpu-zip.c 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/cpu-zip.c binutils-2.27-zip/bfd/cpu-zip.c |
--- binutils-2.27-original/bfd/cpu-zip.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/bfd/cpu-zip.c 2017-01-04 14:26:27.000000000 -0500 |
@@ -0,0 +1,65 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
186,8 → 186,8
+ // the same family. |
+}; |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/doc/archures.texi binutils-2.27-zip/bfd/doc/archures.texi |
--- binutils-2.27/bfd/doc/archures.texi 2016-08-03 04:36:22.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/doc/archures.texi binutils-2.27-zip/bfd/doc/archures.texi |
--- binutils-2.27-original/bfd/doc/archures.texi 2016-08-03 04:36:22.000000000 -0400 |
+++ binutils-2.27-zip/bfd/doc/archures.texi 2016-12-31 17:14:43.103668704 -0500 |
@@ -492,6 +492,8 @@ |
#define bfd_mach_nios2r2 2 |
198,8 → 198,8
bfd_arch_last |
@}; |
@end example |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/doc/bfd.info binutils-2.27-zip/bfd/doc/bfd.info |
--- binutils-2.27/bfd/doc/bfd.info 2016-08-03 04:36:22.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/doc/bfd.info binutils-2.27-zip/bfd/doc/bfd.info |
--- binutils-2.27-original/bfd/doc/bfd.info 2016-08-03 04:36:22.000000000 -0400 |
+++ binutils-2.27-zip/bfd/doc/bfd.info 2017-01-04 14:40:21.000000000 -0500 |
@@ -8466,6 +8466,8 @@ |
#define bfd_mach_nios2r2 2 |
210,8 → 210,8
bfd_arch_last |
}; |
|
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/doc/reloc.texi binutils-2.27-zip/bfd/doc/reloc.texi |
--- binutils-2.27/bfd/doc/reloc.texi 2016-08-03 04:36:22.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/doc/reloc.texi binutils-2.27-zip/bfd/doc/reloc.texi |
--- binutils-2.27-original/bfd/doc/reloc.texi 2016-08-03 04:36:22.000000000 -0400 |
+++ binutils-2.27-zip/bfd/doc/reloc.texi 2016-12-31 17:17:15.950640091 -0500 |
@@ -4214,6 +4214,19 @@ |
@deffnx {} BFD_RELOC_VISIUM_IM16_PCREL |
233,8 → 233,8
|
@example |
|
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/elf32-zip.c binutils-2.27-zip/bfd/elf32-zip.c |
--- binutils-2.27/bfd/elf32-zip.c 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/elf32-zip.c binutils-2.27-zip/bfd/elf32-zip.c |
--- binutils-2.27-original/bfd/elf32-zip.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/bfd/elf32-zip.c 2017-01-24 13:54:25.214097101 -0500 |
@@ -0,0 +1,1134 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
1371,8 → 1371,8
+}; |
+#endif |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/libbfd.h binutils-2.27-zip/bfd/libbfd.h |
--- binutils-2.27/bfd/libbfd.h 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/libbfd.h binutils-2.27-zip/bfd/libbfd.h |
--- binutils-2.27-original/bfd/libbfd.h 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/bfd/libbfd.h 2017-01-04 22:04:11.000000000 -0500 |
@@ -3125,6 +3125,16 @@ |
"BFD_RELOC_VISIUM_HI16_PCREL", |
1391,8 → 1391,8
"@@overflow: BFD_RELOC_UNUSED@@", |
}; |
#endif |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/Makefile.am binutils-2.27-zip/bfd/Makefile.am |
--- binutils-2.27/bfd/Makefile.am 2016-08-03 03:36:50.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/Makefile.am binutils-2.27-zip/bfd/Makefile.am |
--- binutils-2.27-original/bfd/Makefile.am 2016-08-03 03:36:50.000000000 -0400 |
+++ binutils-2.27-zip/bfd/Makefile.am 2016-12-31 17:26:07.151146300 -0500 |
@@ -173,7 +173,8 @@ |
cpu-xstormy16.lo \ |
1430,8 → 1430,8
elf32.c \ |
elflink.c \ |
elfxx-sparc.c \ |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/Makefile.in binutils-2.27-zip/bfd/Makefile.in |
--- binutils-2.27/bfd/Makefile.in 2016-08-03 04:06:27.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/Makefile.in binutils-2.27-zip/bfd/Makefile.in |
--- binutils-2.27-original/bfd/Makefile.in 2016-08-03 04:06:27.000000000 -0400 |
+++ binutils-2.27-zip/bfd/Makefile.in 2017-01-04 14:29:55.000000000 -0500 |
@@ -505,7 +505,8 @@ |
cpu-xstormy16.lo \ |
1477,8 → 1477,8
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo64.Plo@am__quote@ |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf1.Plo@am__quote@ |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf2.Plo@am__quote@ |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/merge.c binutils-2.27-zip/bfd/merge.c |
--- binutils-2.27/bfd/merge.c 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/merge.c binutils-2.27-zip/bfd/merge.c |
--- binutils-2.27-original/bfd/merge.c 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/bfd/merge.c 2017-01-02 14:48:54.000000000 -0500 |
@@ -826,7 +826,7 @@ |
else |
1489,8 → 1489,8
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0) |
return FALSE; |
} |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/reloc.c binutils-2.27-zip/bfd/reloc.c |
--- binutils-2.27/bfd/reloc.c 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/reloc.c binutils-2.27-zip/bfd/reloc.c |
--- binutils-2.27-original/bfd/reloc.c 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/bfd/reloc.c 2017-01-04 22:03:52.000000000 -0500 |
@@ -7697,7 +7697,32 @@ |
BFD_RELOC_VISIUM_IM16_PCREL |
1526,8 → 1526,8
ENDSENUM |
BFD_RELOC_UNUSED |
CODE_FRAGMENT |
diff -Naur '--exclude=*.swp' binutils-2.27/bfd/targets.c binutils-2.27-zip/bfd/targets.c |
--- binutils-2.27/bfd/targets.c 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/bfd/targets.c binutils-2.27-zip/bfd/targets.c |
--- binutils-2.27-original/bfd/targets.c 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/bfd/targets.c 2016-12-31 17:37:14.021847080 -0500 |
@@ -910,6 +910,7 @@ |
extern const bfd_target xtensa_elf32_le_vec; |
1546,8 → 1546,8
#endif /* not SELECT_VECS */ |
|
/* Always support S-records, for convenience. */ |
diff -Naur '--exclude=*.swp' binutils-2.27/binutils/readelf.c binutils-2.27-zip/binutils/readelf.c |
--- binutils-2.27/binutils/readelf.c 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/binutils/readelf.c binutils-2.27-zip/binutils/readelf.c |
--- binutils-2.27-original/binutils/readelf.c 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/binutils/readelf.c 2016-12-31 17:40:19.908241961 -0500 |
@@ -154,6 +154,7 @@ |
#include "elf/xgate.h" |
1610,8 → 1610,8
return reloc_type == 0; |
|
case EM_AARCH64: |
diff -Naur '--exclude=*.swp' binutils-2.27/config.sub binutils-2.27-zip/config.sub |
--- binutils-2.27/config.sub 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/config.sub binutils-2.27-zip/config.sub |
--- binutils-2.27-original/config.sub 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/config.sub 2017-01-11 14:20:34.804049801 -0500 |
@@ -316,7 +316,7 @@ |
| visium \ |
1637,8 → 1637,8
|
# We use `pc' rather than `unknown' |
# because (1) that's what they normally are, and |
diff -Naur '--exclude=*.swp' binutils-2.27/configure binutils-2.27-zip/configure |
--- binutils-2.27/configure 2016-08-03 03:54:55.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/configure binutils-2.27-zip/configure |
--- binutils-2.27-original/configure 2016-08-03 03:54:55.000000000 -0400 |
+++ binutils-2.27-zip/configure 2017-01-08 20:37:33.566336786 -0500 |
@@ -3548,6 +3548,9 @@ |
ft32-*-*) |
1670,8 → 1670,8
esac |
|
# If we aren't building newlib, then don't build libgloss, since libgloss |
diff -Naur '--exclude=*.swp' binutils-2.27/configure.ac binutils-2.27-zip/configure.ac |
--- binutils-2.27/configure.ac 2016-08-03 04:37:38.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/configure.ac binutils-2.27-zip/configure.ac |
--- binutils-2.27-original/configure.ac 2016-08-03 04:37:38.000000000 -0400 |
+++ binutils-2.27-zip/configure.ac 2017-01-08 20:41:54.836485336 -0500 |
@@ -884,6 +884,9 @@ |
ft32-*-*) |
1703,10 → 1703,10
esac |
|
# If we aren't building newlib, then don't build libgloss, since libgloss |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/config/tc-zip.c binutils-2.27-zip/gas/config/tc-zip.c |
--- binutils-2.27/gas/config/tc-zip.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/config/tc-zip.c 2017-03-15 23:03:15.801504568 -0400 |
@@ -0,0 +1,3340 @@ |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/config/tc-zip.c binutils-2.27-zip/gas/config/tc-zip.c |
--- binutils-2.27-original/gas/config/tc-zip.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/config/tc-zip.c 2019-02-14 20:54:05.341671631 -0500 |
@@ -0,0 +1,3403 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: tc-zip.c |
1728,7 → 1728,7
+// |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Copyright (C) 2016-2017, Gisselquist Technology, LLC |
+// Copyright (C) 2016-2018, Gisselquist Technology, LLC |
+// |
+// This program is free software (firmware): you can redistribute it and/or |
+// modify it under the terms of the GNU General Public License as published |
1877,6 → 1877,18
+ return nw; |
+} |
+ |
+static int fits_within(int nbits, int value) { |
+ // -2 fits_within two bits |
+ // -1 fits_within two bits |
+ // 1 fits_within two bits |
+ // 2 does not |
+ // |
+ if (value > 0) |
+ return (value < (1l<<(nbits-1))) ? 1:0; |
+ else |
+ return (value >= -(1l<<(nbits-1))) ? 1:0; |
+} |
+ |
+static uint32_t |
+zip_brev(uint32_t v) { |
+ unsigned r=0, b; |
1947,9 → 1959,9
+ pzipm->r[insn->i_areg].m_subsy = NULL; |
+ return; |
+ } |
+ } else if (insn->i_rp) { |
+ } else if (insn->i_rp) |
+ bknown = MACH_VUNKNOWN; |
+ } else if (ZIP_RNONE == insn->i_breg) |
+ else if (ZIP_RNONE == insn->i_breg) |
+ // B-Op is an immediate only |
+ bknown = MACH_VKNOWN; |
+ else if (insn->i_breg >= ZIP_CC) |
2005,16 → 2017,22
+ |
+ if (ZIPC_ALWAYS != insn->i_cnd) { |
+#ifdef ZIP_DEBUG |
+ fprintf(stderr, "MACHINE, CONDITIONAL\n"); |
+ fprintf(stderr, "\tMACHINE, CONDITIONAL operation\n"); |
+#endif |
+ if ((ZIPO_LDILO == insn->i_op) |
+ &&((av->m_known == MACH_VKNOWN) |
+ ||(av->m_known == MACH_VUPPERKNOWN))) |
+ ||(av->m_known == MACH_VUPPERKNOWN))) { |
+ av->m_known = MACH_VUPPERKNOWN; |
+ else if ((ZIPO_LDI == insn->i_op)||(ZIPO_LDIn == insn->i_op)) |
+ ; // We'll catch this in a moment |
+ else |
+ } else if ((ZIPO_LDI == insn->i_op)||(ZIPO_LDIn == insn->i_op)){ |
+ if (((av->m_known == MACH_VKNOWN) |
+ ||(av->m_known == MACH_VUPPERKNOWN)) |
+ &&(((insn->i_imm ^ av->m_value)&& ~0x0ffff)==0)) { |
+ av->m_known = MACH_VUPPERKNOWN; |
+ } else |
+ av->m_known = MACH_VUNKNOWN; |
+ } else { |
+ av->m_known = MACH_VUNKNOWN; |
+} |
+ } switch(insn->i_op) { |
+ case ZIPO_SUB: |
+ av->m_known = (av->m_known==MACH_VKNOWN) |
2162,6 → 2180,39
+ pzipm->r[ZIP_PC].m_known = MACH_VUNKNOWN; |
+} |
+ |
+static int zip_findnearreg_machine(MACHINEREGS *pzipm, unsigned value) { |
+ int bestrg = ZIP_RNONE, bestd, d; |
+ int rg; |
+ |
+ bestd = 0x7fffffff; |
+ bestrg= ZIP_RNONE; |
+ |
+ for(rg=0; rg<ZIP_CC; rg++) { |
+ if (pzipm->r[rg].m_known == MACH_VUNKNOWN) |
+ continue; |
+ if (pzipm->r[rg].m_known == MACH_VSYMKNOWN) |
+ continue; |
+ if (pzipm->r[rg].m_known == MACH_VUPPERKNOWN) |
+ continue; |
+ gas_assert(pzipm->r[rg].m_known == MACH_VKNOWN); |
+ |
+ if (pzipm->r[rg].m_addsy) |
+ continue; |
+ if (pzipm->r[rg].m_subsy) |
+ continue; |
+ |
+ d = abs(pzipm->r[rg].m_value - value); |
+ if (d < bestd) { |
+ bestd = d; |
+ bestrg = rg; |
+ } |
+ } |
+ |
+ if (fits_within(18,bestd)) |
+ return bestrg; |
+ return ZIP_RNONE; |
+} |
+ |
+#ifdef ZIP_DEBUG |
+static void |
+zip_debug_machine(MACHINEREGS *pzipm) { |
2245,8 → 2296,8
+ return 1; |
+ switch(c) { |
+ case 0: return 1; |
+ case OPTION_CIS: zip_param_cis = 1; return 1; break; |
+ case OPTION_NOCIS: zip_param_cis = 0; return 1; break; |
+ case OPTION_CIS: zip_param_cis = 1; return 1; break; |
+ case OPTION_NOCIS: zip_param_cis = 0; return 1; break; |
+ case OPTION_ZIPM: zip_param_use_machine = 1; return 1; break; |
+ case OPTION_NOZIPM: zip_param_use_machine = 0; return 1; break; |
+ // case OPTION_GOT : zip_param_got = 1; return 1; break; |
2362,7 → 2413,7
+ case ZIPO_SOUT: fprintf(stderr, "%7s", "SOUT"); break; |
+ case ZIPO_NDUMP: fprintf(stderr, "%7s", "NDUMP"); break; |
+ case ZIPO_NEXIT: fprintf(stderr, "%7s", "NEXIT"); break; |
+ case ZIPO_NOUT: fprintf(stderr, "%7s", "OUT"); break; |
+ case ZIPO_NOUT: fprintf(stderr, "%7s", "NOUT"); break; |
+ // |
+ case ZIPO_LJMP: fprintf(stderr, "%7s", "LJMP"); break; |
+ case ZIPO_LJSR: fprintf(stderr, "%7s", "LJSR"); break; |
2846,18 → 2897,6
+ return err; |
+} |
+ |
+static int fits_within(int nbits, int value) { |
+ // -2 fits_within two bits |
+ // -1 fits_within two bits |
+ // 1 fits_within two bits |
+ // 2 does not |
+ // |
+ if (value > 0) |
+ return (value < (1l<<(nbits-1))) ? 1:0; |
+ else |
+ return (value >= -(1l<<(nbits-1))) ? 1:0; |
+} |
+ |
+static const char *zip_parse(const char *line, ZIPIS *insn) { |
+ const char *err = NULL, *opstr = NULL; |
+ char *alt; |
2888,7 → 2927,7
+ |
+ |
+#ifdef ZIP_DEBUG |
+ fprintf(stderr, "**** Parsing %s\n", line); |
+ fprintf(stderr, "\n**** Parsing %s\n", line); |
+#endif |
+ |
+ insn->i_naux = 0; |
3398,6 → 3437,8
+ case ZIPO_TRAP: |
+ insn->i_areg = ZIP_CC; |
+ if (insn->i_breg == ZIP_RNONE) { |
+ // TRAP instructions *ALWAYS* clear the GIE bit |
+ insn->i_imm &= (~0x0020); |
+ if (insn->i_cnd == ZIPC_ALWAYS) |
+ insn->i_op = ZIPO_LDI; |
+ else if (fits_within(16, insn->i_imm)) |
3405,7 → 3446,7
+ else if (fits_within(18, zip_brev(insn->i_imm))) |
+ insn->i_op = ZIPO_BREV; |
+ else |
+ err = "TRAP immediate not supported"; |
+ err = "TRAP 18+ bit immediate not supported"; |
+ } else |
+ insn->i_op = ZIPO_MOV; |
+ break; |
3606,6 → 3647,7
+ // 1. Can't merge anything that's already merged |
+ if ((a|b) & 0x80000000) |
+ return 0; |
+ |
+ ZIP_OPCODE opa, opb; |
+ ZIP_CONDITION ac, bc; |
+ int imma, immb; |
3640,9 → 3682,9
+ } |
+ |
+ // Prohibit moves to/from user regs to merge |
+ if ((opa == ZIPO_MOV)&&(a & 0x44000)) |
+ if ((opa == ZIPO_MOV)&&(a & 0x42000)) |
+ return 0; |
+ if ((opb == ZIPO_MOV)&&(b & 0x44000)) |
+ if ((opb == ZIPO_MOV)&&(b & 0x42000)) |
+ return 0; |
+ |
+ imma = zip_non_cis_immediate(a); |
3649,10 → 3691,8
+ immb = zip_non_cis_immediate(b); |
+ |
+ if (!fits_within(8,imma)) { |
+ // fprintf(stderr, "As immediate is out of range\n"); |
+ return 0; |
+ } if (!fits_within(8,immb)) { |
+ // fprintf(stderr, "Bs immediate is out of range\n"); |
+ return 0; |
+ } |
+ |
3979,6 → 4019,8
+ (insn->i_rp)&&(symbol_get_frag(insn->i_rp->r_sym)==fragP)?1:0, |
+ this_segment, insn->i_imm); |
+#endif |
+ int rg; |
+ |
+ switch(insn->i_op) { |
+ case ZIPO_LDI: // May or may not be conditional |
+ if ((sym_known)&&(this_segment) |
4002,8 → 4044,37
+ // 0.111.x111.11 |
+ insn->i_aux[0] = 0x7fc00000; // NOOP -- if never used. |
+ immv += symv; |
+ if ((insn->i_cnd == ZIPC_ALWAYS) |
+ &&(zip_param_cis) |
+ &&(zip_param_use_machine)&&(pzipm) |
+ &&(!fits_within(8,immv))) { |
+ // Convert an LDI instruction to a MOV instruction if |
+ // it would make that instruction CIS-able. |
+ |
+ if ((rg=zip_findnearreg_machine(pzipm, immv)) |
+ != ZIP_RNONE) { |
+ int d; |
+ d = immv - pzipm->r[rg].m_value; |
+ if (fits_within(3,d)) { |
+ insn->i_op = ZIPO_MOV; |
+ insn->i_breg = rg; |
+ insn->i_naux = 0; |
+ insn->i_imm = d; |
+ zip_assemble_insn_words(fragP, |
+ seg, insn, relax_state, |
+ stretch, pzipm); |
+ return; |
+ } |
+ } |
+ } |
+ |
+ if ((!insn->i_rp)&&(insn->i_cnd == ZIPC_ALWAYS) |
+ &&(fits_within(23, immv))) { |
+ // Can we do this with an ordinary load immediate |
+ // instruction? |
+ // |
+ // If we do this, we'll avoid any opportunity to use |
+ // the ZipMachine and move something into this address |
+ insn->i_naux = 0; |
+ insn->i_code = LDIOP(immv,insn->i_areg); |
+ } else if (((!insn->i_rp)||(sym_known)) |
4019,7 → 4090,8
+ if (insn->i_rp) |
+ insn->i_rp->r_type = BFD_RELOC_NONE; |
+// 0000 1110 0000 0000 0000 0000 0100 0000 |
+ } else if ((zip_param_use_machine)&&(pzipm)&&((!insn->i_rp)||(sym_known)) |
+ } else if ((zip_param_use_machine)&&(pzipm) |
+ &&((!insn->i_rp)||(sym_known)) |
+ &&(pzipm->r[insn->i_areg].m_known) |
+ &&(0==((immv^pzipm->r[insn->i_areg].m_value) |
+ & 0x0ffff0000))) { |
4035,57 → 4107,48
+ pzipm->r[insn->i_areg].m_known = MACH_VUPPERKNOWN; |
+ } else |
+ pzipm->r[insn->i_areg].m_known = MACH_VKNOWN; |
+ } else if ((zip_param_use_machine)&&(pzipm) |
+ &&((!insn->i_rp)||(sym_known)) |
+ &&(pzipm->r[insn->i_areg].m_known) |
+ &&((rg=zip_findnearreg_machine(pzipm, immv))!= ZIP_RNONE) |
+ &&(fits_within(13,pzipm->r[rg].m_value - immv))) { |
+ // Replace LDI with a MOV instruction |
+ insn->i_op = ZIPO_MOV; |
+ insn->i_breg = rg; |
+ insn->i_naux = 0; |
+ insn->i_imm = pzipm->r[rg].m_value - immv; |
+ zip_assemble_insn_words(fragP, seg, insn, |
+ relax_state, stretch, pzipm); |
+ return; |
+ } else if ((zip_param_use_machine)&&(pzipm) |
+ &&((!insn->i_rp)||(sym_known)) |
+ &&(pzipm->r[insn->i_areg].m_known) |
+ &&((rg=zip_findnearreg_machine(pzipm, zip_brev(immv)))!= ZIP_RNONE) |
+ &&(fits_within(14,zip_brev(pzipm->r[rg].m_value - immv)))) { |
+ // Replace LDI with a MOV instruction |
+ insn->i_op = ZIPO_BREV; |
+ insn->i_breg = rg; |
+ insn->i_naux = 0; |
+ insn->i_imm = zip_brev(pzipm->r[rg].m_value - immv); |
+ zip_assemble_insn_words(fragP, seg, insn, |
+ relax_state, stretch, pzipm); |
+ return; |
+ } else { |
+ // |
+ // If the symbol isn't defined, then any immv value |
+ // will work--we have to come back anyway. |
+ // |
+ int known_bypass = 0, i; |
+ |
+ if ((zip_param_use_machine)&&(pzipm)&&( |
+ ((!insn->i_rp) |
+ &&(!fits_within(4,immv))) |
+ ||((insn->i_rp)&&(sym_known)))) { |
+ for(i=0; i<14; i++) { |
+ int offset = immv-pzipm->r[i].m_value; |
+ if ((pzipm->r[i].m_known==MACH_VKNOWN) |
+ &&(fits_within(13, offset)) |
+ &&((insn->i_rp) |
+ ||(!fits_within(4, immv))) |
+ ) { |
+ // Pick the closest value ... if |
+ // there's a choice |
+ if ((!known_bypass) |
+ ||(abs(offset)<known_bypass)) |
+ continue; |
+ insn->i_naux = 0; |
+ insn->i_op = ZIPO_MOV; |
+ insn->i_breg = i; |
+ insn->i_imm = offset; |
+ |
+ insn->i_code = SMPLMOV( |
+ insn->i_cnd, offset, |
+ i, insn->i_areg); |
+ known_bypass = abs(offset); |
+ if (known_bypass==0) |
+ known_bypass = 1; |
+ } |
+ } known_bypass = (known_bypass)?1:0; |
+ } if (!known_bypass) { |
+ // BREV Extension would modify this statement |
+ insn->i_naux = 1; |
+ insn->i_code = IMMOP(ZIPO_BREV, insn->i_cnd, |
+ zip_brev(immv)&0x01ffff, insn->i_areg); |
+ insn->i_aux[0]=IMMOP(ZIPO_LDILO, insn->i_cnd, |
+ (immv&0x0ffff), insn->i_areg); |
+ if (insn->i_rp) |
+ insn->i_rp->r_type = BFD_RELOC_ZIP_LDI; |
+ else if ((zip_param_cis)&&(zip_can_merge(insn->i_code, insn->i_aux[0]))) { |
+ insn->i_code = zip_insn_merge(insn->i_code, insn->i_aux[0]); |
+ insn->i_naux = 0; |
+ } |
+ } else { |
+fprintf(stderr, "known-bypass\n"); |
+ // BREV Extension would modify this statement |
+ insn->i_naux = 1; |
+ insn->i_code = IMMOP(ZIPO_BREV, insn->i_cnd, |
+ zip_brev(immv)&0x01ffff, insn->i_areg); |
+ insn->i_aux[0]=IMMOP(ZIPO_LDILO, insn->i_cnd, |
+ (immv&0x0ffff), insn->i_areg); |
+ if (insn->i_rp) |
+ insn->i_rp->r_type = BFD_RELOC_ZIP_LDI; |
+ else if ((zip_param_cis)&&(zip_can_merge(insn->i_code, insn->i_aux[0]))) { |
+ insn->i_code = zip_insn_merge(insn->i_code, insn->i_aux[0]); |
+ insn->i_naux = 0; |
+ } |
+ } |
+#ifdef ZIP_DEBUG |
5047,8 → 5110,8
+ } |
+ } |
+} |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/config/tc-zip.h binutils-2.27-zip/gas/config/tc-zip.h |
--- binutils-2.27/gas/config/tc-zip.h 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/config/tc-zip.h binutils-2.27-zip/gas/config/tc-zip.h |
--- binutils-2.27-original/gas/config/tc-zip.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/config/tc-zip.h 2017-03-03 09:35:34.527310651 -0500 |
@@ -0,0 +1,191 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
5242,8 → 5305,8
+ |
+#endif |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/configure.tgt binutils-2.27-zip/gas/configure.tgt |
--- binutils-2.27/gas/configure.tgt 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/configure.tgt binutils-2.27-zip/gas/configure.tgt |
--- binutils-2.27-original/gas/configure.tgt 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/gas/configure.tgt 2016-12-31 17:44:37.270167826 -0500 |
@@ -112,6 +112,7 @@ |
x86_64*) cpu_type=i386 arch=x86_64;; |
5262,8 → 5325,8
*-*-aout | *-*-scout) fmt=aout ;; |
*-*-cloudabi*) fmt=elf ;; |
*-*-dragonfly*) fmt=elf em=dragonfly ;; |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/Makefile.am binutils-2.27-zip/gas/Makefile.am |
--- binutils-2.27/gas/Makefile.am 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/Makefile.am binutils-2.27-zip/gas/Makefile.am |
--- binutils-2.27-original/gas/Makefile.am 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/gas/Makefile.am 2016-12-31 17:45:17.941851449 -0500 |
@@ -200,6 +200,7 @@ |
config/tc-xtensa.c \ |
5281,8 → 5344,8
config/xtensa-relax.h |
|
# OBJ files in config |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/Makefile.in binutils-2.27-zip/gas/Makefile.in |
--- binutils-2.27/gas/Makefile.in 2016-08-03 04:16:28.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/Makefile.in binutils-2.27-zip/gas/Makefile.in |
--- binutils-2.27-original/gas/Makefile.in 2016-08-03 04:16:28.000000000 -0400 |
+++ binutils-2.27-zip/gas/Makefile.in 2016-12-31 17:49:43.603837948 -0500 |
@@ -494,6 +494,7 @@ |
config/tc-xtensa.c \ |
5329,8 → 5392,8
xtensa-relax.o: config/xtensa-relax.c |
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xtensa-relax.o -MD -MP -MF $(DEPDIR)/xtensa-relax.Tpo -c -o xtensa-relax.o `test -f 'config/xtensa-relax.c' || echo '$(srcdir)/'`config/xtensa-relax.c |
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xtensa-relax.Tpo $(DEPDIR)/xtensa-relax.Po |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip.exp binutils-2.27-zip/gas/testsuite/gas/zip/zip.exp |
--- binutils-2.27/gas/testsuite/gas/zip/zip.exp 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip.exp binutils-2.27-zip/gas/testsuite/gas/zip/zip.exp |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip.exp 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip.exp 2017-01-12 22:12:40.839206088 -0500 |
@@ -0,0 +1,17 @@ |
+# ZipCPU assembler testsuite |
5350,8 → 5413,8
+ # run_dump_test "zip_insn_jsr" |
+ # run_dump_test "zip_insn_jsrv" |
+} |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_add.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_add.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_add.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_add.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_add.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_add.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_add.d 2017-01-12 22:01:30.790982203 -0500 |
@@ -0,0 +1,41 @@ |
+#as: -novliw |
5395,8 → 5458,8
+ 70: 78 89 ff ff BZ +@0x00020073.*$ |
+ 74: 78 aa 00 00 BNZ +@0xfffe0078.*$ |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_add.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_add.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_add.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_add.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_add.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_add.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_add.s 2017-01-10 12:00:50.870044337 -0500 |
@@ -0,0 +1,33 @@ |
+ .text |
5432,8 → 5495,8
+ add 4,pc |
+ add.z 131071,pc |
+ add.nz -131072,pc |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_bratest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_bratest.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_bratest.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_bratest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_bratest.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_bratest.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_bratest.d 2017-01-10 10:46:16.957469423 -0500 |
@@ -0,0 +1,22 @@ |
+#as: |
5458,8 → 5521,8
+ |
+00000024 <bra_target>: |
+ 24: 7f c0 00 00 NOOP |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_bratest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_bratest.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_bratest.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_bratest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_bratest.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_bratest.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_bratest.s 2017-01-09 10:28:54.983992877 -0500 |
@@ -0,0 +1,14 @@ |
+ .text |
5476,8 → 5539,8
+ ldi -1,r0 |
+bra_target: |
+ noop |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_ctest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_ctest.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_ctest.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_ctest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_ctest.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_ctest.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_ctest.d 2017-01-16 11:02:02.344009430 -0500 |
@@ -0,0 +1,39 @@ |
+#as: |
5519,8 → 5582,8
+ 68: 00 98 00 01 ADD.C +\$1,R0 |
+ 6c: 00 b8 00 01 ADD.NC +\$1,R0 |
+ 70: 00 b8 00 01 ADD.NC +\$1,R0 |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_ctest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_ctest.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_ctest.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_ctest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_ctest.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_ctest.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_ctest.s 2017-01-16 10:55:53.054697861 -0500 |
@@ -0,0 +1,34 @@ |
+ .text |
5557,8 → 5620,8
+ [nc] add 1,R0 |
+ [geu] add 1,R0 |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_lditest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_lditest.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_lditest.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_lditest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_lditest.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_lditest.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_lditest.d 2017-01-10 11:31:45.633275455 -0500 |
@@ -0,0 +1,24 @@ |
+#as: -nozipm |
5585,8 → 5648,8
+ 2c: 42 03 fe ff BREV +\$-257,R8 |
+ 30: 4a 01 fe ff LDI +0xff7ffffe,R9.* |
+ 34: 4a 40 ff fe |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_lditest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_lditest.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_lditest.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_lditest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_lditest.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_lditest.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_lditest.s 2017-01-09 10:28:37.472119620 -0500 |
@@ -0,0 +1,13 @@ |
+ .text |
5602,8 → 5665,8
+ ldi -8388608,r7 |
+ ldi -8388609,r8 |
+ ldi -8388610,r9 |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_mov.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_mov.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_mov.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_mov.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_mov.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_mov.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_mov.d 2017-01-12 22:09:54.925246052 -0500 |
@@ -0,0 +1,86 @@ |
+#as: -novliw -nozipm |
5692,8 → 5755,8
+ c4: 73 40 90 01 MOV +\$-4095\+R2,CC |
+ c8: 73 41 0f ff MOV +\$4095\+R4,CC |
+ cc: 73 41 80 00 MOV +R6,CC |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_mov.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_mov.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_mov.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_mov.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_mov.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_mov.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_mov.s 2017-01-12 16:45:17.027962005 -0500 |
@@ -0,0 +1,93 @@ |
+ .text |
5789,8 → 5852,8
+ mov 4095+r4,cc |
+ mov r6,cc |
+ ; |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_optest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_optest.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_optest.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_optest.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_optest.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_optest.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_optest.d 2017-01-12 22:12:11.497444662 -0500 |
@@ -0,0 +1,98 @@ |
+#as: -novliw -nozipm |
5891,8 → 5954,8
+ 154: 2c 82 00 00 LW +\(\$-131072\),R5 |
+ 158: 34 c2 00 00 SW +R6,\(\$-131072\) |
+ 15c: 17 82 00 00 FPI2F +\$-131072,R2 |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_optest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_optest.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_optest.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_optest.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_optest.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_optest.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_optest.s 2017-01-12 16:28:47.212542071 -0500 |
@@ -0,0 +1,119 @@ |
+ .text |
6014,8 → 6077,8
+ ; ldi |
+ fpi2f -0x20000,r2 |
+ ; |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologue.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologue.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologue.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologue.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologue.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologue.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologue.d 2017-01-10 11:09:36.301473902 -0500 |
@@ -0,0 +1,32 @@ |
+#as: -novliw |
6050,8 → 6113,8
+ 4c: 04 87 40 20 LW +32\(SP\),R0 |
+ 50: 68 80 00 30 ADD +\$48,SP |
+ 54: 7b 40 00 00 RTN + |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologue.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologue.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologue.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologue.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologue.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologue.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologue.s 2017-01-09 07:25:40.495644200 -0500 |
@@ -0,0 +1,24 @@ |
+some_function: |
6078,8 → 6141,8
+ ADD 48,SP |
+ RETN |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologuev.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologuev.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologuev.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologuev.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologuev.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologuev.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologuev.d 2017-01-12 21:58:59.513900839 -0500 |
@@ -0,0 +1,21 @@ |
+#as: -nozipm -vliw |
6103,8 → 6166,8
+ 20: 84 14 84 18 LW +20\(SP\),R0 +| LW +24\(SP\),R0 |
+ 24: 84 1c 84 20 LW +28\(SP\),R0 +| LW +32\(SP\),R0 |
+ 28: ea 30 ff 80 ADD +\$48,SP +| MOV +R0,PC |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologuev.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologuev.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_prologuev.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologuev.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologuev.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_prologuev.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_prologuev.s 2017-01-10 11:29:18.612449601 -0500 |
@@ -0,0 +1,24 @@ |
+some_function: |
6131,8 → 6194,8
+ ADD 48,SP |
+ RETN |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_specials.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_specials.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_specials.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_specials.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_specials.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_specials.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_specials.d 2017-01-24 08:03:32.892847657 -0500 |
@@ -0,0 +1,41 @@ |
+#as: |
6176,8 → 6239,8
+ 70: 7f c0 02 27 NOUT R7 |
+ 74: 7f 80 02 33 SOUT uR3 |
+ 78: 7f c0 02 38 NOUT uR8 |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_specials.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_specials.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_specials.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_specials.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_specials.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_specials.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_specials.s 2017-01-19 07:18:13.405003668 -0500 |
@@ -0,0 +1,35 @@ |
+ .text |
6215,8 → 6278,8
+ sout uR3 |
+ nout uR8 |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_vliw.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_vliw.d |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_vliw.d 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_vliw.d binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_vliw.d |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_vliw.d 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_vliw.d 2017-01-12 21:50:28.719237156 -0500 |
@@ -0,0 +1,77 @@ |
+#as: -vliw |
6296,8 → 6359,8
+ f0: bb 3f c4 18 CMP +\$63\+R7,R7 +| LW 24\(SP\),R8 *$ |
+ f4: cd 1c de 7c SW +R9,\$28\(SP\) +| LDI +\$124,R11 *$ |
+ f8: 1b 40 40 01 MOV +\$1\+R1,R3 |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/testsuite/gas/zip/zip_insn_vliw.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_vliw.s |
--- binutils-2.27/gas/testsuite/gas/zip/zip_insn_vliw.s 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_vliw.s binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_vliw.s |
--- binutils-2.27-original/gas/testsuite/gas/zip/zip_insn_vliw.s 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/gas/testsuite/gas/zip/zip_insn_vliw.s 2017-01-12 16:55:54.690241718 -0500 |
@@ -0,0 +1,110 @@ |
+ .text |
6410,8 → 6473,8
+ mov 1+r1,r3 |
+ |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/gas/write.c binutils-2.27-zip/gas/write.c |
--- binutils-2.27/gas/write.c 2016-08-03 03:36:51.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/gas/write.c binutils-2.27-zip/gas/write.c |
--- binutils-2.27-original/gas/write.c 2016-08-03 03:36:51.000000000 -0400 |
+++ binutils-2.27-zip/gas/write.c 2016-12-31 17:51:52.470985149 -0500 |
@@ -2676,7 +2676,7 @@ |
|
6422,8 → 6485,8
addressT after; |
|
if (symbolP) |
diff -Naur '--exclude=*.swp' binutils-2.27/include/dis-asm.h binutils-2.27-zip/include/dis-asm.h |
--- binutils-2.27/include/dis-asm.h 2016-08-03 03:36:53.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/include/dis-asm.h binutils-2.27-zip/include/dis-asm.h |
--- binutils-2.27-original/include/dis-asm.h 2016-08-03 03:36:53.000000000 -0400 |
+++ binutils-2.27-zip/include/dis-asm.h 2016-12-31 17:52:29.022758231 -0500 |
@@ -318,10 +318,12 @@ |
extern int print_insn_rl78_g10 (bfd_vma, disassemble_info *); |
6438,8 → 6501,8
|
extern void print_aarch64_disassembler_options (FILE *); |
extern void print_i386_disassembler_options (FILE *); |
diff -Naur '--exclude=*.swp' binutils-2.27/include/elf/common.h binutils-2.27-zip/include/elf/common.h |
--- binutils-2.27/include/elf/common.h 2016-08-03 03:36:53.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/include/elf/common.h binutils-2.27-zip/include/elf/common.h |
--- binutils-2.27-original/include/elf/common.h 2016-08-03 03:36:53.000000000 -0400 |
+++ binutils-2.27-zip/include/elf/common.h 2016-12-31 17:53:58.942198950 -0500 |
@@ -411,6 +411,9 @@ |
/* Old constant that might be in use by some software. */ |
6451,8 → 6514,8
/* See the above comment before you add a new EM_* value here. */ |
|
/* Values for e_version. */ |
diff -Naur '--exclude=*.swp' binutils-2.27/include/elf/zip.h binutils-2.27-zip/include/elf/zip.h |
--- binutils-2.27/include/elf/zip.h 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/include/elf/zip.h binutils-2.27-zip/include/elf/zip.h |
--- binutils-2.27-original/include/elf/zip.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/include/elf/zip.h 2017-01-18 18:19:33.764898333 -0500 |
@@ -0,0 +1,58 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
6513,8 → 6576,8
+END_RELOC_NUMBERS(R_ZIP_max) |
+ |
+#endif /* _ELF_ZIP_H */ |
diff -Naur '--exclude=*.swp' binutils-2.27/ld/configure.tgt binutils-2.27-zip/ld/configure.tgt |
--- binutils-2.27/ld/configure.tgt 2016-08-03 03:36:54.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/ld/configure.tgt binutils-2.27-zip/ld/configure.tgt |
--- binutils-2.27-original/ld/configure.tgt 2016-08-03 03:36:54.000000000 -0400 |
+++ binutils-2.27-zip/ld/configure.tgt 2016-12-31 17:55:04.013793303 -0500 |
@@ -816,6 +816,8 @@ |
;; |
6525,8 → 6588,8
*-*-ieee*) targ_emul=vanilla |
;; |
*-tandem-none) targ_emul=st2000 |
diff -Naur '--exclude=*.swp' binutils-2.27/ld/emulparams/elf32zip.sh binutils-2.27-zip/ld/emulparams/elf32zip.sh |
--- binutils-2.27/ld/emulparams/elf32zip.sh 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/ld/emulparams/elf32zip.sh binutils-2.27-zip/ld/emulparams/elf32zip.sh |
--- binutils-2.27-original/ld/emulparams/elf32zip.sh 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/ld/emulparams/elf32zip.sh 2017-01-05 08:22:45.000000000 -0500 |
@@ -0,0 +1,50 @@ |
+################################################################################ |
6579,8 → 6642,8
+COMMONPAGESIZE=0x1000 |
+EMBEDDED=yes |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/ld/Makefile.am binutils-2.27-zip/ld/Makefile.am |
--- binutils-2.27/ld/Makefile.am 2016-08-03 03:36:54.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/ld/Makefile.am binutils-2.27-zip/ld/Makefile.am |
--- binutils-2.27-original/ld/Makefile.am 2016-08-03 03:36:54.000000000 -0400 |
+++ binutils-2.27-zip/ld/Makefile.am 2016-12-31 17:57:39.684819835 -0500 |
@@ -286,6 +286,7 @@ |
eelf32xc16xs.c \ |
6600,8 → 6663,8
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ |
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
|
diff -Naur '--exclude=*.swp' binutils-2.27/ld/Makefile.in binutils-2.27-zip/ld/Makefile.in |
--- binutils-2.27/ld/Makefile.in 2016-08-03 03:36:54.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/ld/Makefile.in binutils-2.27-zip/ld/Makefile.in |
--- binutils-2.27-original/ld/Makefile.in 2016-08-03 03:36:54.000000000 -0400 |
+++ binutils-2.27-zip/ld/Makefile.in 2016-12-31 17:59:30.788122513 -0500 |
@@ -654,6 +654,7 @@ |
eelf32xc16xs.c \ |
6629,8 → 6692,8
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ |
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
|
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/configure binutils-2.27-zip/opcodes/configure |
--- binutils-2.27/opcodes/configure 2016-08-03 04:33:39.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/configure binutils-2.27-zip/opcodes/configure |
--- binutils-2.27-original/opcodes/configure 2016-08-03 04:33:39.000000000 -0400 |
+++ binutils-2.27-zip/opcodes/configure 2017-01-05 08:50:32.000000000 -0500 |
@@ -12685,7 +12685,7 @@ |
bfd_xtensa_arch) ta="$ta xtensa-dis.lo" ;; |
6641,8 → 6704,8
"") ;; |
*) as_fn_error "*** unknown target architecture $arch" "$LINENO" 5 ;; |
esac |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/configure.ac binutils-2.27-zip/opcodes/configure.ac |
--- binutils-2.27/opcodes/configure.ac 2016-08-03 03:36:54.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/configure.ac binutils-2.27-zip/opcodes/configure.ac |
--- binutils-2.27-original/opcodes/configure.ac 2016-08-03 03:36:54.000000000 -0400 |
+++ binutils-2.27-zip/opcodes/configure.ac 2017-01-05 08:49:53.000000000 -0500 |
@@ -353,7 +353,7 @@ |
bfd_xtensa_arch) ta="$ta xtensa-dis.lo" ;; |
6653,8 → 6716,8
"") ;; |
*) AC_MSG_ERROR(*** unknown target architecture $arch) ;; |
esac |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/disassemble.c binutils-2.27-zip/opcodes/disassemble.c |
--- binutils-2.27/opcodes/disassemble.c 2016-08-03 03:36:54.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/disassemble.c binutils-2.27-zip/opcodes/disassemble.c |
--- binutils-2.27-original/opcodes/disassemble.c 2016-08-03 03:36:54.000000000 -0400 |
+++ binutils-2.27-zip/opcodes/disassemble.c 2016-12-31 18:02:03.139162969 -0500 |
@@ -98,6 +98,7 @@ |
#define ARCH_xtensa |
6676,8 → 6739,8
#ifdef ARCH_vax |
case bfd_arch_vax: |
disassemble = print_insn_vax; |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/Makefile.am binutils-2.27-zip/opcodes/Makefile.am |
--- binutils-2.27/opcodes/Makefile.am 2016-08-03 03:36:54.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/Makefile.am binutils-2.27-zip/opcodes/Makefile.am |
--- binutils-2.27-original/opcodes/Makefile.am 2016-08-03 03:36:54.000000000 -0400 |
+++ binutils-2.27-zip/opcodes/Makefile.am 2017-01-05 08:28:32.000000000 -0500 |
@@ -86,7 +86,9 @@ |
w65-opc.h \ |
6709,8 → 6772,8
POTFILES = $(HFILES) $(CFILES) |
po/POTFILES.in: @MAINT@ Makefile |
for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \ |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/Makefile.in binutils-2.27-zip/opcodes/Makefile.in |
--- binutils-2.27/opcodes/Makefile.in 2016-08-03 03:36:54.000000000 -0400 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/Makefile.in binutils-2.27-zip/opcodes/Makefile.in |
--- binutils-2.27-original/opcodes/Makefile.in 2016-08-03 03:36:54.000000000 -0400 |
+++ binutils-2.27-zip/opcodes/Makefile.in 2017-01-05 08:28:04.000000000 -0500 |
@@ -386,7 +386,9 @@ |
w65-opc.h \ |
6743,10 → 6806,10
|
.c.o: |
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/zip-dis.c binutils-2.27-zip/opcodes/zip-dis.c |
--- binutils-2.27/opcodes/zip-dis.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/opcodes/zip-dis.c 2017-03-03 09:34:03.983308793 -0500 |
@@ -0,0 +1,474 @@ |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/zip-dis.c binutils-2.27-zip/opcodes/zip-dis.c |
--- binutils-2.27-original/opcodes/zip-dis.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/opcodes/zip-dis.c 2018-03-22 17:57:34.688834861 -0400 |
@@ -0,0 +1,527 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: zip-dis.c |
6836,6 → 6899,25
+ // 0111.1000.10cc.c0ii.iiii.iiii.iiii.iiii |
+ if ((nxtword&0xffc40000) == 0x78800000) |
+ return 1; |
+ // OR ... the second word could be a |
+ // load into the PC |
+ // 0.1111.10010.ccc.0.iiiiiiiiiiiiiiiiii LW.X #imm,PC |
+ // 0.1111.10010.ccc.1.rrrr.iiiiiiiiiiiiii LW.X #(R),PC |
+ // |
+ // These must be unconditional, since the MOV above is |
+ // also unconditional |
+ // 0111.1100.10cc.cxxxxx.... LW.X #(R),PC |
+ if ((nxtword&0xfff80000) == 0x7c800000) |
+ return 1; |
+ // |
+ // OR ... the second word could be a |
+ // Register move into the PC from the current |
+ // register set |
+ // 0.1111.01101.ccc.0.rrrr.0.iiiiiiiiiiiii MOV #(R),PC |
+ // 0111.1011.01cc.c0rr.rr0i.iiiiiiiiiiii MOV #(R),PC |
+ if ((nxtword&0xfffc2000) == 0x7b400000) |
+ return 1; |
+ // |
+ return 0; |
+} |
+ |
6851,7 → 6933,7
+} |
+ |
+static inline int |
+TWOWORD_CIS_JSR(uint32_t iword) { |
+TWOWORD_CIS_LJSR(uint32_t iword) { |
+ // MOV 2(PC) | LOD (PC),PC |
+ // |
+ // 1.0000.111.1.1111.010 |
6863,7 → 6945,7
+ |
+static inline int |
+CIS_JSR(uint32_t iword __attribute__((unused)) ) { |
+ if (TWOWORD_CIS_JSR(iword)) |
+ if (TWOWORD_CIS_LJSR(iword)) |
+ return 1; |
+ // MOV 1(PC) | MOV Rx,PC |
+ // |
6885,7 → 6967,7
+ // MOV 2(PC),PC |
+ if (iword == 0x0343c002) |
+ return 1; |
+ if (TWOWORD_CIS_JSR(iword)) |
+ if (TWOWORD_CIS_LJSR(iword)) |
+ return 1; |
+ // The conditional LJMP is three words, which we don't handle ... |
+ // Any BREV command could be the beginning of a twoword instruction |
6959,18 → 7041,52
+ |
+ return; |
+ } else if (TWOWORD_JSR(ins, nxtword)) { |
+ int cv = zip_getbits(nxtword, ZIP_BITFIELD(3,19)); |
+ int iv = zip_sbits(nxtword, 18); |
+ if ((nxtword&0xffc40000) == 0x78800000) { |
+ int cv = zip_getbits(nxtword, ZIP_BITFIELD(3,19)); |
+ int iv = zip_sbits(nxtword, 18); |
+ |
+ *refaddr = iv + addr + 8; |
+ sprintf(line, "%s%s", "JSR", zip_ccstr[cv]); |
+ sprintf(line, "%-11s", line); |
+ sprintf(line, "%s0x%08x", line, *refaddr); |
+ *refaddr = iv + addr + 8; |
+ sprintf(line, "%s%s", "JSR", zip_ccstr[cv]); |
+ sprintf(line, "%-11s", line); |
+ sprintf(line, "%s0x%08x", line, *refaddr); |
+ |
+ return; |
+ } else if (TWOWORD_CIS_JSR(ins)) { |
+ return; |
+ } else if ((nxtword&0xfff80000) == 0x7c800000) { |
+ // OR ... the second word could be a load into the PC |
+ if ((nxtword>>18)&1) { |
+ // LW #(Rw),PC |
+ int iv = zip_sbits(nxtword, 14); |
+ int rb = zip_ubits(nxtword>>14, 4); |
+ |
+ sprintf(line,"%-11s#%d(%s)", "IJSR", iv, |
+ zip_regstr[rb]); |
+ *refaddr = 0; |
+ } else { |
+ // LW (#),PC |
+ int iv = zip_sbits(nxtword, 18); |
+ sprintf(line,"%-11s(#%d)", "IJSR", iv); |
+ *refaddr = iv; |
+ } |
+ return; |
+ } else { // if ((nxtword&0xfffc2000) == 0x7b400000) |
+ // OR ... the second word could be a register move into |
+ // the PC from the current register set |
+ int rb = zip_ubits(nxtword>>14, 4); |
+ int iv = zip_sbits(nxtword, 13); |
+ |
+ *refaddr = 0; |
+ if (iv == 0) |
+ sprintf(line, "%-11s %s", "JSR", |
+ zip_regstr[rb]); |
+ else |
+ sprintf(line, "%-11s#%d+%s", "JSR",iv, |
+ zip_regstr[rb]); |
+ |
+ return; |
+ } |
+ } else if (TWOWORD_CIS_LJSR(ins)) { |
+ *refaddr = nxtword; |
+ sprintf(line, "%-11s", "JSR"); |
+ sprintf(line, "%-11s", "LJSR"); |
+ sprintf(line, "%s0x%08x", line, *refaddr); |
+ return; |
+ } else if (CIS_JSR(ins)) { |
7168,7 → 7284,7
+ if ((*info->read_memory_func)(vma, ibytes, 12, info) ==0) |
+ refaddr = (ibytes[8]<<24)|(ibytes[9]<<16)|(ibytes[10]<<8)|(ibytes[11]); |
+ sprintf(&astr[strlen(astr)], "@0x%08x", refaddr); |
+ } else if (TWOWORD_CIS_JSR(iword)) { |
+ } else if (TWOWORD_CIS_LJSR(iword)) { |
+ refaddr = nxtword; |
+ sprintf(astr, "%-11s0x%08x", "JSR", refaddr); |
+ } else |
7209,7 → 7325,7
+ return 8; |
+ if (TWOWORD_JSR(iword,nxtword)) |
+ return 8; |
+ if (TWOWORD_CIS_JSR(iword)) |
+ if (TWOWORD_CIS_LJSR(iword)) |
+ return 8; |
+ return 4; |
+} |
7221,8 → 7337,8
+ return print_zip_insn; |
+} |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/zip-dis.h binutils-2.27-zip/opcodes/zip-dis.h |
--- binutils-2.27/opcodes/zip-dis.h 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/zip-dis.h binutils-2.27-zip/opcodes/zip-dis.h |
--- binutils-2.27-original/opcodes/zip-dis.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/opcodes/zip-dis.h 2016-12-31 18:10:03.512012534 -0500 |
@@ -0,0 +1,45 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
7270,9 → 7386,9
+zip_get_disassembler(bfd *abfd); |
+ |
+#endif |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/zip-opc.c binutils-2.27-zip/opcodes/zip-opc.c |
--- binutils-2.27/opcodes/zip-opc.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/opcodes/zip-opc.c 2017-03-06 14:00:55.404955681 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/zip-opc.c binutils-2.27-zip/opcodes/zip-opc.c |
--- binutils-2.27-original/opcodes/zip-opc.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/opcodes/zip-opc.c 2018-06-07 10:35:06.439245343 -0400 |
@@ -0,0 +1,362 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
7524,54 → 7640,54
+ // 1111.1000.10xc.c0ii.iixx.xxxx.xxxx.xxxx |
+ // Mask, val, result, Ra, Rb, I, condition (no conditions for OP_UNDER_TEST) |
+ // BRA: 1.1111.011.0.sssssss |
+ { "BRA", 0xff800000, 0xf9000000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "BRA", 0xff800000, 0xf9000000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ // CLR: 1.rrrr.110.00000000 |
+ { "CLR", 0x87ff0000, 0x86000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ { "CLR", 0x87ff0000, 0x86000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ // RTN: 1.1111.111.0.0000.000, MOV R0,Pc |
+ { "RTN", 0xffff0000, 0xff800000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ { "RTN", 0xffff0000, 0xff800000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ // JMP: 1.1111.111.0.rrrrsss |
+ { "JMP", 0xff800000, 0xff000000, ZIP_REGFIELD(27),ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ { "JMP", 0xff800000, 0xff000000, ZIP_REGFIELD(27),ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // LJSR: 1.000_0.011_.0.111_1.001 ?.1111.110.1.1111.000 |
+ // { "LJSR",0xffffffff, 0x83797ef8, ZIP_REGFIELD(27),ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // |
+ // 1.rrrr.000.0.sssssss |
+ // 1rrr.r000.0sss.ssss |
+ { "SUB", 0x87800000, 0x80000000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "SUB", 0x87800000, 0x80000000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ // 1.rrrr.000.1.rrrrsss |
+ { "SUB", 0x87800000, 0x80800000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // |
+ // 1.rrrr.001.0.sssssss |
+ // 1.rrrr.001.1.rrrrsss |
+ { "AND", 0x87800000, 0x81000000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "AND", 0x87800000, 0x81000000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "AND", 0x87800000, 0x81800000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // |
+ // 1.rrrr.010.0.sssssss |
+ // 1.rrrr.010.1.rrrrsss |
+ { "ADD", 0x87800000, 0x82000000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "ADD", 0x87800000, 0x82000000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "ADD", 0x87800000, 0x82800000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // |
+ // 1.rrrr.011.a.rrrrsss |
+ { "CMP", 0x87800000, 0x83000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "CMP", 0x87800000, 0x83800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ { "CMP", 0x87800000, 0x83000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "CMP", 0x87800000, 0x83800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // |
+ // 1.rrrr.100.0.sssssss |
+ // 1.rrrr.100.1.rrrrsss |
+ { "LW", 0x87800000, 0x84000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_SP, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "LW", 0x87800000, 0x84800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ { "LW", 0x87800000, 0x84000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_SP, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "LW", 0x87800000, 0x84800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // 1.rrrr.101.ssssssss |
+ { "SW", 0x87800000, 0x85000000, ZIP_OPUNUSED, ZIP_REGFIELD(27), ZIP_SP, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ { "SW", 0x87800000, 0x85000000, ZIP_OPUNUSED, ZIP_REGFIELD(27), ZIP_SP, ZIP_IMMFIELD(7,16), ZIP_OPUNUSED }, |
+ // 1.rrrr.110.0.sssssss |
+ { "SW", 0x87800000, 0x85800000, ZIP_OPUNUSED, ZIP_REGFIELD(27), ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ { "SW", 0x87800000, 0x85800000, ZIP_OPUNUSED, ZIP_REGFIELD(27), ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // 1.rrrr.110.iiiiiiii |
+ { "LDI", 0x87000000, 0x86000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(8,16), ZIP_OPUNUSED }, |
+ { "LDI", 0x87000000, 0x86000000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(8,16), ZIP_OPUNUSED }, |
+ // 1.rrrr.111.1.sssssss |
+ { "MOV", 0x87800000, 0x87800000, ZIP_OPUNUSED, ZIP_REGFIELD(27), ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ { "MOV", 0x87800000, 0x87800000, ZIP_OPUNUSED, ZIP_REGFIELD(27), ZIP_REGFIELD(19), ZIP_IMMFIELD(3,16), ZIP_OPUNUSED }, |
+ // |
+ // 1.rrrr.111.1.rrrrsss |
+ // Illegal instruction !! |
+ { "ILLV", 0x80000000, 0x80000000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(32,16), ZIP_OPUNUSED }, |
+ // Global illegal instruction |
+ { "ILL", 0x00000000, 0x00000000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(32,0), ZIP_OPUNUSED } |
+ { "ILL", 0x00000000, 0x00000000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(32,0), ZIP_OPUNUSED } |
+}; |
+ |
+static const ZOPCODE zip_opbottomlist_raw[] = { |
7636,8 → 7752,8
+const int nzip_oplist = (sizeof(zip_oplist_raw)/sizeof(ZOPCODE)); |
+const int nzip_opbottom = (sizeof(zip_opbottomlist_raw)/sizeof(ZOPCODE)); |
+ |
diff -Naur '--exclude=*.swp' binutils-2.27/opcodes/zip-opc.h binutils-2.27-zip/opcodes/zip-opc.h |
--- binutils-2.27/opcodes/zip-opc.h 1969-12-31 19:00:00.000000000 -0500 |
diff -Naur '--exclude=*.swp' binutils-2.27-original/opcodes/zip-opc.h binutils-2.27-zip/opcodes/zip-opc.h |
--- binutils-2.27-original/opcodes/zip-opc.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.27-zip/opcodes/zip-opc.h 2017-02-10 17:48:01.761470841 -0500 |
@@ -0,0 +1,77 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
/gcc-script.sh
6,8 → 6,8
## Project: Zip CPU -- a small, lightweight, RISC CPU soft core |
## |
## Purpose: To handle all of the GCC configuration options properly. This |
## both runs the GCC configure script, as well as initially running |
## make on the resulting configured directory. |
## runs the GCC configure script, using options known to work |
## with the ZipCPU. |
## |
## |
## Creator: Dan Gisselquist, Ph.D. |
60,7 → 60,16
set -e |
CLFS_HOST=$MACHTYPE |
CLFS_TARGET="zip" |
INSTALL_BASE=`pwd`/install |
if [[ -z "$INSTALLD" ]] |
then |
INSTALLD=`pwd`/install |
fi |
if [[ ! $(which zip-as) ]] |
then |
echo "GCC-script ERROR: Unable to find zip-as, the ZipCPU assembler, in your path" |
exit -1 |
fi |
INSTALL_BASE=${INSTALLD} |
mkdir -p ${INSTALL_BASE}/cross-tools |
mkdir -p ${INSTALL_BASE}/tools/lib |
mkdir -p ${INSTALL_BASE}/usr/include |
79,7 → 88,7
--disable-multilib \ |
--disable-threads --disable-tls \ |
--enable-checking --disable-nls \ |
--without-fp --with-newlib |
--with-newlib |
|
echo $PATH | grep ${INSTALL_BASE}/cross-tools/bin \ |
|| export PATH=$PATH:${INSTALL_BASE}/cross-tools/bin |
/gcc-zippatch.patch
162,12 → 162,13
# If we aren't building newlib, then don't build libgloss, since libgloss |
diff -Naur '--exclude=*.swp' gcc-6.2.0/gcc/cfgexpand.c gcc-6.2.0-zip/gcc/cfgexpand.c |
--- gcc-6.2.0/gcc/cfgexpand.c 2016-04-27 08:23:50.000000000 -0400 |
+++ gcc-6.2.0-zip/gcc/cfgexpand.c 2016-12-31 16:38:36.195534819 -0500 |
@@ -74,6 +74,15 @@ |
+++ gcc-6.2.0-zip/gcc/cfgexpand.c 2018-06-05 21:18:19.438798488 -0400 |
@@ -74,6 +74,16 @@ |
#include "tree-chkp.h" |
#include "rtl-chkp.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) |
179,7 → 180,7
/* 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 |
@@ -1172,7 +1181,7 @@ |
@@ -1172,7 +1182,7 @@ |
base_align = crtl->max_used_stack_slot_alignment; |
else |
base_align = MAX (crtl->max_used_stack_slot_alignment, |
188,7 → 189,7
<< ASAN_SHADOW_SHIFT); |
} |
else |
@@ -2225,7 +2234,7 @@ |
@@ -2225,7 +2235,7 @@ |
data.asan_vec.safe_push (offset); |
/* Leave space for alignment if STRICT_ALIGNMENT. */ |
if (STRICT_ALIGNMENT) |
197,7 → 198,7
<< ASAN_SHADOW_SHIFT) |
/ BITS_PER_UNIT, 1); |
|
@@ -5745,7 +5754,7 @@ |
@@ -5745,7 +5755,7 @@ |
&& (last = get_last_insn ()) |
&& JUMP_P (last)) |
{ |
300,6 → 301,232
+ • ui Ÿ ø?` À@` @` @` (@` 0@` 8@` @@` H@` P@` X@`
+ x@` €@` HƒìH‹9 H…Àtè HƒÄà ÿ59 ÿ%9 @ ÿ%9 h éàÿÿÿÿ%ú8 h éÐÿÿÿÿ%ò8 h éÀÿÿÿÿ%ê8 h é°ÿÿÿÿ%â8 h é ÿÿÿÿ%Ú8 h éÿÿÿÿ%Ò8 h é€ÿÿÿÿ%Ê8 h épÿÿÿÿ%Â8 h é`ÿÿÿÿ%º8 h éPÿÿÿÿ%²8 h
+ éÿÿÿÿ%8 f 1íI‰Ñ^H‰âHƒäðPTIÇÀð@ HÇÁ€@ HÇÇ>@ è7ÿÿÿôfD ¸¯@` UH-¨@` HƒøH‰åv¸ H…Àt]¿¨@` ÿàf„ ]Ã@ f.„ ¾¨@` UHî¨@` HÁþH‰åH‰ðHÁè?HÆHÑþt¸ H…Àt]¿¨@` ÿà ]ÃfD €=8 uUH‰åènÿÿÿ]Æþ7 óÃ@ ¿ >` Hƒ? uë“ ¸ H…ÀtñUH‰åÿÐ]ézÿÿÿUH‰åHƒìH‰}øH‹EøH‰Áº¸ ¾ ¿@ èÃþÿÿÉÃUH‰åHƒìH‰}øH‰uðH‹UðH‹Eø¾Á @ H‰Ç¸ è6þÿÿÉÃUH‰åHƒì0H‰}øH‰uðH‰UèH‰MàL‰EØL‰MÐH‹}èH‹uÐH‹MÐH‹UðH‹EøHƒìÿuÿuØÿuàI‰ùI‰ð¾Ð @ H‰Ç¸ èÚýÿÿHƒÄ ÉÃUH‰åHìÐ H‰½hÿÿÿH‰µ`ÿÿÿH‰•XÿÿÿH‰PÿÿÿL‰…HÿÿÿL‰@ÿÿÿH‹EH‰…8ÿÿÿdH‹%( H‰Eø1ÀH‹•8ÿÿÿH…pÿÿÿ¾³!@ H‰Ç¸ è¤ýÿÿH‹•8ÿÿÿH‹…hÿÿÿ¾È!@ H‰Ç¸ èDýÿÿH‹½8ÿÿÿH‹µPÿÿÿH‹XÿÿÿH‹•`ÿÿÿH‹…hÿÿÿHƒìÿµ`ÿÿÿI‰ùI‰ð¾ð!@ H‰Ç¸ èÿüÿÿHƒÄH‹½8ÿÿÿH‹µPÿÿÿH‹@ÿÿÿH‹•`ÿÿÿH‹…hÿÿÿHƒìÿµ`ÿÿÿI‰ùI‰ð¾€"@ H‰Ç¸ è¶üÿÿHƒÄH‹½8ÿÿÿH‹PÿÿÿH‹•@ÿÿÿH‹µ`ÿÿÿH‹…hÿÿÿHƒìh?#@ A¹<#@ I‰øH‰ÇèBþÿÿHƒÄH‹½8ÿÿÿH‹PÿÿÿH‹•@ÿÿÿH‹µ`ÿÿÿH‹…hÿÿÿHƒìhD#@ A¹A#@ I‰øH‰ÇèþÿÿHƒÄH‹½8ÿÿÿH‹PÿÿÿH‹•@ÿÿÿH‹µ`ÿÿÿH‹…hÿÿÿHƒìhJ#@ A¹G#@ I‰øH‰ÇèÀýÿÿHƒÄH‹½8ÿÿÿH‹PÿÿÿH‹•@ÿÿÿH‹µ`ÿÿÿH‹…hÿÿÿHƒìhP#@ A¹M#@ I‰øH‰ÇèýÿÿHƒÄH‹½8ÿÿÿH‹PÿÿÿH‹•@ÿÿÿH‹µ`ÿÿÿH‹…hÿÿÿHƒìhW#@ A¹S#@ I‰øH‰Çè>ýÿÿHƒÄH‹½8ÿÿÿH‹PÿÿÿH‹•@ÿÿÿH‹µ`ÿÿÿH‹…hÿÿÿHƒìh]#@ A¹Y#@ I‰øH‰ÇèýüÿÿHƒÄH‹EødH3%( tèçúÿÿÉÃUH‰åHì€ H‰½¨ùÿÿH‰µ ùÿÿH‰•˜ùÿÿH‰ùÿÿL‰…ˆùÿÿdH‹%( H‰Eø1ÀH‹•˜ùÿÿH…ðùÿÿ¾`#@ H‰Ç¸ èøúÿÿH‹•˜ùÿÿH…ðûÿÿ¾ $@ H‰Ç¸ èØúÿÿH‹•˜ùÿÿH…ðýÿÿ¾8$@ H‰Ç¸ è¸úÿÿL…ðýÿÿH½ðûÿÿH‹ùÿÿH•ðùÿÿH‹µ ùÿÿH‹…¨ùÿÿHƒìÿµˆùÿÿM‰ÁI‰øH‰ÇècüÿÿHƒÄH‹•˜ùÿÿH…ðùÿÿ¾¸$@ H‰Ç¸ èRúÿÿH‹•˜ùÿÿH…ðûÿÿ¾ˆ%@ H‰Ç¸ è2úÿÿH‹•˜ùÿÿH…ðýÿÿ¾Ø%@ H‰Ç¸ èúÿÿH‹• ùÿÿH…°ùÿÿ¾Š&@ H‰Ç¸ èòùÿÿL…ðýÿÿH½ðûÿÿH‹ùÿÿH•ðùÿÿHµ°ùÿÿH‹…¨ùÿÿHƒìÿµˆùÿÿM‰ÁI‰øH‰ÇèûÿÿHƒÄH‹EødH3%( tè'ùÿÿÉÃUH‰åHƒì H‰}øH‰uðH‰UèH‰MàH‹}àH‹uèH‹MèH‹UðH‹EøHƒìÿuàÿuàÿuàI‰ùI‰ð¾˜&@ H‰Ç¸ èùÿÿHƒÄ ÉÃUH‰åHƒì H‰}øH‰uðH‰UèH‰MàH‹}àH‹uèH‹MèH‹UðH‹EøI‰ùI‰ð¾(@ H‰Ç¸ è¹øÿÿÉÃUH‰åHƒì H‰}øH‰uðH‰UèH‰MàH‹}àH‹uèH‹MèH‹UðH‹EøI‰ùI‰ð¾`)@ H‰Ç¸ èrøÿÿÉÃUH‰åHƒì H‰}øH‰uðH‰UèH‰MàH‹}àH‹uèH‹MèH‹UðH‹EøI‰ùI‰ð¾ˆ*@ H‰Ç¸ è+øÿÿÉÃUH‰åHƒì H‰}øH‰uðH‰UèH‰MàH‹}àH‹uèH‹MèH‹UðH‹EøI‰ùI‰ð¾˜+@ H‰Ç¸ èä÷ÿÿÉÃUH‰åHƒì H‰}øH‰uðH‰UèH‰MàH‹}àH‹uèH‹MèH‹UðH‹EøI‰ùI‰ð¾à,@ H‰Ç¸ è÷ÿÿÉÃUH‰åHƒì H‰}øH‰uðH‰UèH‰MàH‹}àH‹uèH‹MèH‹UðH‹EøI‰ùI‰ð¾(.@ H‰Ç¸ èV÷ÿÿÉÃUH‰å¿p/@ èåöÿÿ]ÃUH‰åAUATSHƒì(‰}ÌH‰uÀH‹?0 ¾²/@ H‰Çè:÷ÿÿH‰EØH‹/0 H‰EЃ}Ì~!H‹EÀHƒÀH‹ ¶ <-uè›ÿÿÿ¿ è4÷ÿÿƒ}ÌŽ´ H‹EÀHƒÀH‹ H‰Çè‡öÿÿH‰ÃH‹Ý/ H‰ÇèuöÿÿH9Ãr~H‹É/ H‹EÀHƒÀL‹ H‹EÀHƒÀH‹ H‰ÇèKöÿÿI‰ÅH‹¡/ H‰Çè9öÿÿI)ÅL‰èLàH‰ÞH‰ÇèUöÿÿ…Àu/H‹EÀHƒÀH‹ ¾ H‰ÇèYöÿÿ…ÀuH‹EÀHƒÀH‹ H‰ÇèÂõÿÿH‹EÀH‹@H‰EÐH‹EØH‰Çè÷ÿÿH‹EØA¸´/@ ¹¸/@ º¹/@ ¾Á/@ H‰ÇèäúÿÿH‹EØA¸È/@ ¹¸/@ ºÌ/@ ¾Õ/@ H‰ÇèÃúÿÿH‹EØA¸Ü/@ ¹¸/@ ºà/@ ¾è/@ H‰Çè¢úÿÿH‹EØA¸ï/@ ¹ô/@ º0@ ¾0@ H‰ÇèúÿÿH‹EØA¸0@ ¹ô/@ º0@ ¾0@ H‰Çè`úÿÿH‹EØA¸$0@ ¹¸/@ º(0@ ¾/0@ H‰Çè?úÿÿH‹EØA¸60@ ¹¸/@ º90@ ¾@0@ H‰ÇèúÿÿH‹EØA¸G0@ ¹¸/@ ºK0@ ¾R0@ H‰ÇèýùÿÿH‹EØA¸Y0@ ¹¸/@ º]0@ ¾i0@ H‰ÇèÜùÿÿH‹EØA¸q0@ ¹¸/@ ºu0@ ¾0@ H‰Çè»ùÿÿH‹EØA¸‡0@ ¹¸/@ º‹0@ ¾—0@ H‰ÇèšùÿÿH‹EØHƒìh3@ A¹ 0@ A¸x1@ ¹
++2@ º2@ ¾3@ H‰Çè¬öÿÿHƒÄH‹EØHƒìh5@ A¹ 3@ A¸ø3@ ¹
++2@ º4@ ¾5@ H‰ÇèxöÿÿHƒÄH‹Eؾ–5@ H‰ÇèÖõÿÿH‹Eع?#@ º<#@ ¾´5@ H‰ÇèÆúÿÿH‹EعD#@ ºA#@ ¾´5@ H‰Çè«úÿÿH‹EعJ#@ ºG#@ ¾´5@ H‰ÇèúÿÿH‹EعP#@ ºM#@ ¾´5@ H‰ÇèuúÿÿH‹EعW#@ ºS#@ ¾´5@ H‰ÇèZúÿÿH‹Eع]#@ ºY#@ ¾´5@ H‰Çè?úÿÿH‹Eؾ¹5@ H‰Çè#õÿÿH‹Eع?#@ º<#@ ¾Ö5@ H‰ÇèkúÿÿH‹EعD#@ ºA#@ ¾Ö5@ H‰ÇèPúÿÿH‹EعJ#@ ºG#@ ¾Ö5@ H‰Çè5úÿÿH‹EعP#@ ºM#@ ¾Ö5@ H‰ÇèúÿÿH‹EعW#@ ºS#@ ¾Ö5@ H‰ÇèÿùÿÿH‹Eع]#@ ºY#@ ¾Ö5@ H‰ÇèäùÿÿH‹Eؾà5@ H‰ÇèpôÿÿH‹Eع?#@ º<#@ ¾ 6@ H‰ÇèFúÿÿH‹EعD#@ ºA#@ ¾ 6@ H‰Çè+úÿÿH‹EعJ#@ ºG#@ ¾ 6@ H‰ÇèúÿÿH‹EعP#@ ºM#@ ¾ 6@ H‰ÇèõùÿÿH‹EعW#@ ºS#@ ¾ 6@ H‰ÇèÚùÿÿH‹Eع]#@ ºY#@ ¾ 6@ H‰Çè¿ùÿÿH‹Eؾ6@ H‰Çè½óÿÿH‹Eع?#@ º<#@ ¾"6@ H‰ÇèLùÿÿH‹EعD#@ ºA#@ ¾"6@ H‰Çè1ùÿÿH‹EعJ#@ ºG#@ ¾"6@ H‰ÇèùÿÿH‹EعP#@ ºM#@ ¾"6@ H‰ÇèûøÿÿH‹EعW#@ ºS#@ ¾"6@ H‰ÇèàøÿÿH‹Eع]#@ ºY#@ ¾"6@ H‰ÇèÅøÿÿH‹Eؾ'6@ H‰Çè
+M( H‹n( H‹Uо6@ H‰Ç¸ èïÿÿ¿ è^ïÿÿ¿ èTïÿÿ@ AWAVA‰ÿAUATL%~% UH-~% SI‰öI‰ÕL)åHƒìHÁýè'îÿÿH…ít 1Û„ L‰êL‰öD‰ÿAÿÜHƒÃH9ëuêHƒÄ[]A\A]A^A_Ãf.„ óà HƒìHƒÄà ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
++;;
++;; Filename: zip-ops.md
++;;
++;; Project: Zip CPU -- a small, lightweight, RISC CPU soft core
++;;
++;; Purpose: This is a computer generated machine description of the
++;; ZipCPU's operations. It is computer generated simply for
++;; two reasons. First, I can't seem to find a way to generate this
++;; information within GCC's current constructs. Specifically, the
++;; CPU's instructions normally set the condition codes, unless they
++;; are conditional instructions when they don't. Second, the ZipCPU is
++;; actually quite regular. Almost all of the instructions have the same
++;; form. This form turns into many, many RTL instructions. Because the
++;; CPU doesn't match any of the others within GCC, that means either
++;; I have a *lot* of cut, copy, paste, and edit to do to create the file
++;; and upon any and every edit, or I need to build a program to generate
++;; the remaining .md constructs. Hence, I chose the latter to minimize
++;; the amount of work I needed to do.
++;;
++;;
++;; Creator: Dan Gisselquist, Ph.D.
++;; Gisselquist Technology, LLC
++;;
++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
++;;
++;; Copyright (C) 2017, Gisselquist Technology, LLC
++;;
++;; This program is free software (firmware): 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 MERCHANTIBILITY or
++;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++;; for more details.
++;;
++;; License: GPL, v3, as defined and found on www.gnu.org,
++;; http://www.gnu.org/licenses/gpl.html
++;;
++;;
++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
++;;
++;;
++ ;
++;
++; %s
++;
++;
++ (define_insn "%s_%s"
++ [(cond_exec (%s (reg:CC CC_REG) (const_int 0))
++ %s)]
++ "%s" ; Condition
++ "%s.%s\t%%1,%%0 ; genzip, conditional operator" ; Template
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++;
++;
++ %s (genzipop_long) ;
++;
++;
++; %s (genzipop_long)
++;
++;
++;
++ (define_insn "%s"
++ [%s
++ (clobber (reg:CC CC_REG))]
++ "%s"
++ "%s\t%%2,%%0 ; %s"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "set")])
++;
++;
++ (define_insn "%s_raw"
++ [%s
++ (set (reg:CC CC_REG) (compare:CC (match_dup 0) (const_int 0)))]
++ "%s"
++ "%s\t%%1,%%0 ; %s_raw"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "set")])
++;
++;
++ eq Z ne NZ lt LT ge GE ltu C geu NC (set (match_operand:SI 0 "register_operand" "=r")
++ (%s (match_operand:SI 1 "register_operand" "0")
++ (match_operand:SI 2 "zip_opb_single_operand_p" "rO"))) (set (match_dup 0) (%s (match_dup 0) (match_dup 2))) (set (match_operand:SI 0 "register_operand" "=r")
++ (%s (match_dup 0)
++ (match_operand:SI 1 "zip_opb_single_operand_p" "rO"))) (set (match_operand:SI 0 "register_operand" "=r")
++ (%s (match_operand:SI 1 "register_operand" "0")
++ (plus:SI (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "const_int_operand" "N")))) (set (match_dup 0) (%s (match_dup 0)
++ (plus:SI (match_dup 2) (match_dup 3)))) (set (match_operand:SI 0 "register_operand" "=r")
++ (%s (match_dup 0)
++ (plus:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "const_int_operand" "N")))) %s_off ;
++;
++(define_insn "%s_%s"
++ [(set (match_operand:SI 0 "register_operand" "=r,r,r,Q")
++ (if_then_else:SI (%s (reg:CC CC_REG) (const_int 0))
++ (match_operand:SI 1 "general_operand" "r,Q,i,r")
++ (match_dup 0)))]
++ ""
++ "@
++ MOV.%s %%1,%%0 ; cmov
++ LW.%s %%1,%%0 ; cmov
++ LDI.%s %%1,%%0 ; cmov
++ SW.%s %%1,%%0 ; cmov"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++ ;
++;
++(define_insn "%s_%s"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (if_then_else:SI (%s (reg:CC CC_REG) (const_int 0))
++ (plus:SI (match_dup 0)
++ (match_operand:SI 1 "zip_opb_single_operand_p" "rO"))
++ (match_dup 0)))]
++ ""
++ "ADD.%s %%1,%%0 ; cadd"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++ ;
++;
++(define_insn "%s_%s"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (if_then_else:SI (%s (reg:CC CC_REG) (const_int 0))
++ (xor:SI (match_dup 0)
++ (const_int -1))
++ (match_dup 0)))]
++ ""
++ "NOT.%s %%0 ; cnot"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++ ;
++;
++(define_insn "%s_%s"
++ [(set (match_operand:SI 0 "register_operand" "+r")
++ (if_then_else:SI (%s (reg:CC CC_REG) (const_int 0))
++ (neg:SI (match_dup 0))
++ (match_dup 0)))]
++ ""
++ "NEG.%s %%0 ; cneg"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++ ;
++;
++(define_insn "%s_%s"
++ [(set (match_operand:SI 0 "register_operand" "+r")
++ (if_then_else:SI (%s (reg:CC CC_REG) (const_int 0))
++ (and:SI (match_dup 0) (match_operand:SI 1 "zip_opb_single_operand_p" "rO"))
++ (match_dup 0)))]
++ ""
++ "AND.%s %%1,%%0 ; cand"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++ ;
++;
++(define_insn "%s_%s"
++ [(set (match_operand:SI 0 "register_operand" "+r")
++ (if_then_else:SI (%s (reg:CC CC_REG) (const_int 0))
++ (ior:SI (match_dup 0) (match_operand:SI 1 "zip_opb_single_operand_p" "rO"))
++ (match_dup 0)))]
++ ""
++ "OR.%s %%1,%%0 ; cior"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++ ;
++;
++(define_insn "%s_%s"
++ [(set (match_operand:SI 0 "register_operand" "+r")
++ (if_then_else:SI (%s (reg:CC CC_REG) (const_int 0))
++ (xor:SI (match_dup 0) (match_operand:SI 1 "zip_opb_single_operand_p" "rO"))
++ (match_dup 0)))]
++ ""
++ "XOR.%s %%1,%%0 ; cxor"
++ [(set_attr "predicable" "no") (set_attr "ccresult" "unchanged")])
++ USAGE: genzipops +#define TARGET_OPTION_OPTIMIZATION_TABLE zip_option_optimization_table |
+ |
+struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; |
diff -Naur '--exclude=*.swp' gcc-6.2.0/gcc/config/zip/genzipops gcc-6.2.0-zip/gcc/config/zip/genzipops |
--- gcc-6.2.0/gcc/config/zip/genzipops 1969-12-31 19:00:00.000000000 -0500 |
+++ gcc-6.2.0-zip/gcc/config/zip/genzipops 2018-03-22 18:33:09.823726748 -0400 |
@@ -0,0 +1,201 @@ |