You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2002 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
|
Dec
|
2003 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(1) |
Apr
(35) |
May
(9) |
Jun
(10) |
Jul
|
Aug
(6) |
Sep
(23) |
Oct
(24) |
Nov
(18) |
Dec
(81) |
2006 |
Jan
(37) |
Feb
(2) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(23) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Jan-Benedict G. <jb...@us...> - 2004-05-27 15:53:05
|
Update of /cvsroot/linux-vax/toolchain/experimental_toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26229 Modified Files: experimental_toolchain.sh README Log Message: - Add (and document) new option "--jbglaw" to fetch the two needed patch sets from http://lug-owl.de/~jbglaw/vax-linux-{gcc,libc}.patch instead of using SF.net's ViewCVS to fetch the current version. Both ways should provide you with exactly the same patch set, but SF.net's front-end web servers tend to provide material some hours old... Index: README =================================================================== RCS file: /cvsroot/linux-vax/toolchain/experimental_toolchain/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README 27 May 2004 14:40:28 -0000 1.1 +++ README 27 May 2004 15:52:55 -0000 1.2 @@ -3,7 +3,7 @@ ~~~~~~~~~~~ ~$ mkdir opt ~$ mkdir /tmp/to_be_removed -~$ ./experimental_toolchain.sh -d -i /tmp/to_be_removed opt +~$ ./experimental_toolchain.sh -d -i -j /tmp/to_be_removed opt Space Requirements @@ -27,6 +27,13 @@ vax-linux-gcc up to that point, that can be used (somewhat) to compile the Linux kernel. +-j/--jbglaw will fetch the two needed patchsets (for gcc and libc) +from http://lug-owl.de/~jbglaw/vax-linux-{gcc,libc}.patch, instead +of accessing sourceforge's ViewCVS. Fetching the patches from +lug-owl.de (these are the same as on sf.net) gives you access to +the current version, while sf.net's front-end web servers tend to +need some hours to present current data... + Please note that this GCC is of quite limited use right now. It omits some (serious?) warnings during kernel compile, can't actually compile glibc and I suppose that it contains quite a lot of bugs. However, Index: experimental_toolchain.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/experimental_toolchain/experimental_toolchain.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- experimental_toolchain.sh 27 May 2004 14:40:28 -0000 1.1 +++ experimental_toolchain.sh 27 May 2004 15:52:55 -0000 1.2 @@ -35,6 +35,14 @@ # $Id$ # # $Log$ +# Revision 1.2 2004/05/27 15:52:55 jbglaw +# - Add (and document) new option "--jbglaw" to fetch the two needed +# patch sets from http://lug-owl.de/~jbglaw/vax-linux-{gcc,libc}.patch +# instead of using SF.net's ViewCVS to fetch the current version. +# Both ways should provide you with exactly the same patch set, but +# SF.net's front-end web servers tend to provide material some hours +# old... +# # Revision 1.1 2004/05/27 14:40:28 jbglaw # - Moving script + readme into own directory. # - Also adding both applied patchsets for easier access (they're perfectly @@ -72,6 +80,7 @@ INSTALL_DIR= DO_PREPARE=0 DO_BUILD=0 +USE_JBGLAW=0 set -e @@ -83,6 +92,8 @@ DO_PREPARE=1;; -b|--build|-i|--install) DO_BUILD=1;; + -j|--jbglaw) + USE_JBGLAW=1;; *) if [ -z "${GLOBAL_BASE_DIR}" ]; then GLOBAL_BASE_DIR="${1}" @@ -99,7 +110,7 @@ [ -n "${GLOBAL_BASE_DIR}" ] && echo "$0: Will use ${GLOBAL_BASE_DIR} for temporary storage" [ -n "${INSTALL_DIR}" ] && echo "$0: Will install to ${INSTALL_DIR}" if [ -z "${GLOBAL_BASE_DIR}" -o -z "${INSTALL_DIR}" ]; then - echo "$0 [--prepare] [--install] <tempdir> <installdir>" >&2 + echo "$0 [--prepare] [--install] [--jbglaw] <tempdir> <installdir>" >&2 exit 1 fi GLOBAL_BASE_DIR="`cd "${GLOBAL_BASE_DIR}"; pwd`" @@ -216,11 +227,13 @@ # out of the box:) # cd "${PREP_DIR}" - wget -O vax-linux-gcc.patch 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-gcc.patch?rev=HEAD&view=auto' - wget -O vax-linux-libc 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-libc.patch?rev=HEAD&view=auto' - # wget http://lug-owl.de/~jbglaw/vax-linux-gcc.patch - # wget http://lug-owl.de/~jbglaw/vax-linux-libc.patch - + if [ "${USE_JBGLAW}" -eq 1 ]; then + wget http://lug-owl.de/~jbglaw/vax-linux-gcc.patch + wget http://lug-owl.de/~jbglaw/vax-linux-libc.patch + else + wget -O vax-linux-gcc.patch 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-gcc.patch?rev=HEAD&view=auto' + wget -O vax-linux-libc.patch 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-libc.patch?rev=HEAD&view=auto' + fi cd "${LOCAL_SRC_DIR}/gcc-HEAD" patch -p1 < "${PREP_DIR}/vax-linux-gcc.patch" |
From: Jan-Benedict G. <jb...@us...> - 2004-05-27 15:27:34
|
Update of /cvsroot/linux-vax/toolchain/experimental_toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20608 Modified Files: vax-linux-gcc.patch Log Message: - Add two obviously missing breaks. Spotted by Andrew Pinski (pinskia FROM gcc, gnu, org). This doesn't fix the bug worked-around by the return-on-op-being-NULL, but it won't do any harm, though... Index: vax-linux-gcc.patch =================================================================== RCS file: /cvsroot/linux-vax/toolchain/experimental_toolchain/vax-linux-gcc.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vax-linux-gcc.patch 27 May 2004 14:40:28 -0000 1.1 +++ vax-linux-gcc.patch 27 May 2004 15:27:24 -0000 1.2 @@ -269,3 +269,16 @@ code = GET_CODE (op); /* A NOT is likely to be found as the first operand of an AND +--- gcc-HEAD/gcc/config/vax/vax.c~pre_missing_break_fix 2004-05-27 16:56:31.000000000 +0200 ++++ gcc-HEAD/gcc/config/vax/vax.c 2004-05-27 16:56:49.000000000 +0200 +@@ -653,8 +653,10 @@ + if (GET_CODE (XEXP (x, 1)) == CONST_INT) + if ((unsigned)(INTVAL (XEXP (x, 1)) + 63) < 127) + fmt = "e"; ++ break; + case MINUS: + c = (mode == DFmode) ? 13 : 8; /* 6/8 on VAX 9000, 16/15 on VAX 2 */ ++ break; + case IOR: + case XOR: + c = 3; |
From: Jan-Benedict G. <jb...@us...> - 2004-05-27 14:40:43
|
Update of /cvsroot/linux-vax/toolchain/experimental_toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11830 Added Files: README experimental_toolchain.sh vax-linux-gcc.patch vax-linux-libc.patch Log Message: - Moving script + readme into own directory. - Also adding both applied patchsets for easier access (they're perfectly fine on lug-owl.de where they used to be, but I think it's better if you've got access to them, too :) --- NEW FILE: experimental_toolchain.sh --- #!/bin/sh # # This script will attempt to # # - Download a lot of things # - Create releases of gcc + binutils # - Unpack gcc / binutils # - Patch everything # - Build most of a toolchain from it # # Bugs: # # - This script is highly sub-optimal wrt. download size. # - It doesn't finish completely because vax-linux isn't yet # fully supported :-( # - To checkout binutils, you (once) have to run # cvs -d :pserver:an...@so...:/cvs/src login # Password is "anoncvs". # - Checkouts of GCC are only available via ssh transport. So # ssh may ask you (once) to confirm FSF's host key with "yes". # - To checkout binutils, you (once) have to run # cvs -d :pserver:an...@so...:/cvs/glibc login # Password is "anoncvs". # - To checkout the Linux kernel, you (once) have to run # cvs -d:pserver:ano...@cv...:/cvsroot/linux-vax login # Password is empty, "", nada, ... # - You need to have /usr/share/misc/config.guess . Get that from # GNU's config package... # - You may want to set MAKE_FLAGS to "-j2" if you're the happy # owner of a dual CPU machine... # # # # $Id: experimental_toolchain.sh,v 1.1 2004/05/27 14:40:28 jbglaw Exp $ # # $Log: experimental_toolchain.sh,v $ # Revision 1.1 2004/05/27 14:40:28 jbglaw # - Moving script + readme into own directory. # - Also adding both applied patchsets for easier access (they're perfectly # fine on lug-owl.de where they used to be, but I think it's better if # you've got access to them, too :) # # Revision 1.2 2004/05/27 12:45:35 jbglaw # - For now, also copy config.guess because currently, Dan hardcoded it's # path into crosstool.sh. However, the plan is to supply $BUILD from # outside, so I've already sent a patch... # - Also, I'm just putting in a small patch to the gcc patchset (still on # my website, I'd really check it into CVS RSN!) to not let the SIGSEGV # during compilation of check_fds.c happen. This was due to wrong code # in ./gcc-HEAD/gcc/config/vax/vax.c, at round line 709. The second line # after the opening '{' makes it die, bt a fast 'return c+5;' makes it # survive. # # Andy, could you have a look at that? # # Revision 1.1 2004/05/19 09:15:02 jbglaw # - Script and README to build a vax-linux toolchain from all HEAD sources. # - Currently capable of creating a Kernel-only cross-compiler, but glibc # is not yet built fully (due to glibc/gcc bugs). # - I suppose that this GCC isn't all _that_ useful, but the generated .o # files at least contain VAX assembly:) Maybe some parts are even really # useable. I'll try to verify that by linking 2.95.2 code with 3.5.0 # code (just by adding more and more gcc-HEAD compiled .o files into # kernel link run) to see if it instantly breaks... # # # MAKE_FLAGS="-j2" MAKE_FLAGS="" GLOBAL_BASE_DIR= INSTALL_DIR= DO_PREPARE=0 DO_BUILD=0 set -e # set -x while [ $# -ne 0 ]; do case "${1}" in -d|--download|-p|--prepare) DO_PREPARE=1;; -b|--build|-i|--install) DO_BUILD=1;; *) if [ -z "${GLOBAL_BASE_DIR}" ]; then GLOBAL_BASE_DIR="${1}" else INSTALL_DIR="${1}" fi;; esac shift done [ "${DO_PREPARE}" -eq 1 ] && echo "$0: Will download and prepare sources" [ "${DO_BUILD}" -eq 1 ] && echo "$0: Will create a cross-compiler and install it" [ -n "${GLOBAL_BASE_DIR}" ] && echo "$0: Will use ${GLOBAL_BASE_DIR} for temporary storage" [ -n "${INSTALL_DIR}" ] && echo "$0: Will install to ${INSTALL_DIR}" if [ -z "${GLOBAL_BASE_DIR}" -o -z "${INSTALL_DIR}" ]; then echo "$0 [--prepare] [--install] <tempdir> <installdir>" >&2 exit 1 fi GLOBAL_BASE_DIR="`cd "${GLOBAL_BASE_DIR}"; pwd`" INSTALL_DIR="`cd "${INSTALL_DIR}"; pwd`" # # Where do we find things? # PREP_DIR="${GLOBAL_BASE_DIR}/prepare" LOCAL_SRC_DIR="${GLOBAL_BASE_DIR}/source" BLD_DIR="${GLOBAL_BASE_DIR}/build" if [ "${DO_PREPARE}" -eq 1 ]; then # # Prepare directories # mkdir -p "${PREP_DIR}" mkdir -p "${LOCAL_SRC_DIR}" mkdir -p "${BLD_DIR}" # # Prepare binutils. # # I had a hard time trying to directly build a binutils CVS co. I failed. # My current approach is to do a checkout, then build a release tar-bz2 from # it and unpack this. *That* actually will work. # cd "${PREP_DIR}" cvs -z 9 -d :pserver:an...@so...:/cvs/src co binutils cd src make -f src-release binutils.tar.bz2 cd "${LOCAL_SRC_DIR}" tar xjf ${PREP_DIR}/src/binutils-*.tar.bz2 mv binutils-* binutils-HEAD # # Prepare GCC. # # GCC is quite like binutils. I haven't figured out how to build it off a # checked-out CVS tree. So I first build a release from it. # # The release script does have another problem: it doesn't use the local # CVS sandbox, but calls cvs on it's own to create a fresh sandbox. To save # some bandwidth, I first download the release script, then call it. # # Additionally, the release script uses wrong CVS server name and repository # path... # cd "${PREP_DIR}" wget -O gcc_release.0 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gcc/gcc/maintainer-scripts/gcc_release?rev=HEAD&content-type=text/plain' cat gcc_release.0 | sed -e 's#^CVS_SERVER.*#CVS_SERVER="savannah.gnu.org"#' > gcc_release.1 cat gcc_release.1 | sed -e 's#^CVS_REPOSITORY.*#CVS_REPOSITORY="/cvsroot/gcc"#' > gcc_release chmod +x gcc_release mkdir -p "${PREP_DIR}/gcc" ./gcc_release -s HEAD:HEAD -d "${PREP_DIR}/gcc" -u anoncvs sources tarfiles cd "${LOCAL_SRC_DIR}" tar xjf ${PREP_DIR}/gcc/*/gcc-HEAD-*.tar.bz2 mv gcc-* gcc-HEAD # # Prepare glibc. # # Preparing glibc sources is actually an easy task. Just check it out, # then remove the nptl* directories (these won't probably work yet for # vax-linux, but I may need to verify that again. It's from ages where # we had no current GCC at hand...). # cd "${PREP_DIR}" cvs -z 9 -d :pserver:an...@so...:/cvs/glibc co libc mkdir -p "${LOCAL_SRC_DIR}/glibc-HEAD" (cd libc && tar cf - . ;) | (cd "${LOCAL_SRC_DIR}/glibc-HEAD" && tar xf -;) cd "${LOCAL_SRC_DIR}/glibc-HEAD" rm -rf nptl* # # Download current crosstool scripts. We only need crosstool.sh, though... # cd "${PREP_DIR}" wget -O crosstool_website.html http://www.kegel.com/crosstool/ CT_URL="`cat crosstool_website.html | grep crosstool- | tail -n 1 | sed -e 's#.*\(http://[a-z0-9./-]*\).*#\1#'`" wget -O crosstool_current.tar.gz "${CT_URL}" tar xzf crosstool_current.tar.gz cp crosstool-*/crosstool.sh "${GLOBAL_BASE_DIR}" chmod +x "${GLOBAL_BASE_DIR}/crosstool.sh" # # This'll go away after Dan applied the patch I sent him:) # cp crosstool-*/config.guess "${GLOBAL_BASE_DIR}" # # Get current VAX Linux Kernel v2.6.x from CVS # cd "${PREP_DIR}" cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co kernel-2.5 mkdir -p "${LOCAL_SRC_DIR}/linux-HEAD" (cd kernel-2.5 && tar cf - . ;) | (cd "${LOCAL_SRC_DIR}/linux-HEAD" && tar xf -;) cd "${LOCAL_SRC_DIR}/linux-HEAD" make ARCH=vax defconfig # # Now patch gcc and libc with current patches. binutils already work # out of the box:) # cd "${PREP_DIR}" wget -O vax-linux-gcc.patch 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-gcc.patch?rev=HEAD&view=auto' wget -O vax-linux-libc 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-libc.patch?rev=HEAD&view=auto' # wget http://lug-owl.de/~jbglaw/vax-linux-gcc.patch # wget http://lug-owl.de/~jbglaw/vax-linux-libc.patch cd "${LOCAL_SRC_DIR}/gcc-HEAD" patch -p1 < "${PREP_DIR}/vax-linux-gcc.patch" cd "${LOCAL_SRC_DIR}/glibc-HEAD" patch -p1 < "${PREP_DIR}/vax-linux-libc.patch" fi # if [ "${DO_PREPARE}" -eq 1 ]; then # # This was the fun part. Now everything should (at least partially) # build:) Yeppee!!! # # This last step takes about 11min on my Athlon (2x 1.4GHz, 1.5GB RAM) # until building of GLIBC breaks due to compiler errors. # if [ "${DO_BUILD}" -eq 1 ]; then cd "${GLOBAL_BASE_DIR}" PREFIX="${INSTALL_DIR}" \ BUILD_DIR="${BLD_DIR}" \ SRC_DIR="${LOCAL_SRC_DIR}" \ BINUTILS_DIR=binutils-HEAD \ GCC_DIR=gcc-HEAD \ GLIBC_DIR=glibc-HEAD \ LINUX_DIR=linux-HEAD \ TARGET=vax-linux \ TARGET_CFLAGS="-O -g" \ BUILD=`/usr/share/misc/config.guess` \ USE_SYSROOT=yes \ PARALLELMFLAGS="${MAKE_FLAGS}" ./crosstool.sh fi # if [ "${DO_BUILD}" -eq 1 ]; then --- NEW FILE: vax-linux-libc.patch --- diff -Nur -x texis -x Entries -x Entries.Log -x Root -x Repository some_libc/elf/elf.h libc-work/elf/elf.h --- some_libc/elf/elf.h 2004-05-07 03:56:25.000000000 +0200 +++ libc-work/elf/elf.h 2004-05-15 18:37:28.000000000 +0200 @@ -2462,6 +2462,29 @@ #define R_X86_64_NUM 24 +/* DEC VAX relocations. */ +#define R_VAX_32 1 /* Direct 32 bit */ +#define R_VAX_16 2 /* Direct 16 bit */ +#define R_VAX_8 3 /* Direct 8 bit */ +#define R_VAX_PC32 4 /* PC relative 32 bit */ +#define R_VAX_PC16 5 /* PC relative 16 bit */ +#define R_VAX_PC8 6 /* PC relative 8 bit */ +#define R_VAX_GOT32 7 /* 32 bit PC relative GOT entry */ +#define R_VAX_PLT32 13 /* 32 bit PC relative PLT address */ +#define R_VAX_COPY 19 /* Copy symbol at runtime */ +#define R_VAX_GLOB_DAT 20 /* Create GOT entry */ +#define R_VAX_JMP_SLOT 21 /* Create PLT entry */ [...7452 lines suppressed...] +/* FIXME -maybe*/ +#define CALL_MCOUNT .data; 1:; .long 0; .text; moval 1b,%r0; jsb mcount; +#else +#define CALL_MCOUNT /* Do nothing. */ +#endif + +#ifdef NO_UNDERSCORES +/* Since C identifiers are not normally prefixed with an underscore + on this system, the asm identifier `syscall_error' intrudes on the + C name space. Make sure we use an innocuous name. */ +#define syscall_error __syscall_error +#define mcount _mcount +#endif + +#endif /* __ASSEMBLER__ */ --- /dev/null 2004-02-01 01:00:40.000000000 +0100 +++ glibc-HEAD/sysdeps/vax/abort-instr.h 2004-05-27 00:20:39.000000000 +0200 @@ -0,0 +1,2 @@ +/* An instruction which should crash any program is a breakpoint. */ +#define ABORT_INSTRUCTION asm ("bugw $0") --- NEW FILE: README --- Quick-Start ~~~~~~~~~~~ ~$ mkdir opt ~$ mkdir /tmp/to_be_removed ~$ ./experimental_toolchain.sh -d -i /tmp/to_be_removed opt Space Requirements ~~~~~~~~~~~~~~~~~~ As far as the build process proceeds right now, you have to have about 60MB free space in the install directory (~/opt in the example above) and about 1.6GB for the temporary directory. Needed space will raise somewhat while glibc (or GCC) gets fixed, of course... Theory fo Operation ~~~~~~~~~~~~~~~~~~~ If you call it with -d/--download/-p/--prepare, the script will try to download all current HEAD versions of binutils, gcc, glibc and the vax-linux kernel, as well as patches to gcc and glibc and the crosstool scripts (by Dan Kegel). If called with -i/--install/-b/--build, it'll take the prepared sources and try to build a vax-linux toolchain. Currently, it breaks while compiling parts of glibc, but you'll see that it build a vax-linux-gcc up to that point, that can be used (somewhat) to compile the Linux kernel. Please note that this GCC is of quite limited use right now. It omits some (serious?) warnings during kernel compile, can't actually compile glibc and I suppose that it contains quite a lot of bugs. However, it's a *start* (albeit hackish), but I hope that others help to finish this task:) Additional Notes ~~~~~~~~~~~~~~~~ Dan Kegel started to investigate in how to do a Canadian Cross. This means that this script should, at some point of time, be capable of also generating a vax-linux hosted native compiler for vax-linux. But prior that, we need to fix bugs in GCC and glibc... May 19, 2004, Jan-Benedict Glaw <jb...@lu...> --- NEW FILE: vax-linux-gcc.patch --- diff -Nur some_gcc/gcc-HEAD-20040515/gcc/config/vax/linux.h gcc-HEAD-20040515/gcc/config/vax/linux.h --- some_gcc/gcc-HEAD-20040515/gcc/config/vax/linux.h 1970-01-01 01:00:00.000000000 +0100 +++ gcc-HEAD-20040515/gcc/config/vax/linux.h 2004-05-15 21:31:00.000000000 +0200 @@ -0,0 +1,134 @@ +/* Definitions for VAX running Linux-based GNU systems with ELF format. + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Contributed by Andy Phillips. + Based heavily on i386 version by Eric Youngdale, + with modifications by H.J. Lu. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + + +/* temporary*/ +#define inhibit_libc + +#define LINUX_DEFAULT_ELF +/* FIXME: check this with the gas sources */ +#define LPREFIX ".L" + +/* Keeps gcc quiet. This is defined in terms of the vaxc structure + * alignment flag. Only really applicable to VMS. For this target we + * will be getting a definition from svr4.h */ + +#ifdef PCC_BITFIELD_TYPE_MATTERS +#undef PCC_BITFIELD_TYPE_MATTERS +#endif + +#undef TARGET_VERSION +#define TARGET_VERSION fprintf (stderr, " (VAX Linux/ELF)"); + +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + LINUX_TARGET_OS_CPP_BUILTINS(); \ + if (flag_pic) \ + { \ + builtin_define ("__PIC__"); \ + builtin_define ("__pic__"); \ + } \ + } \ + while (0) + +#undef CPP_SPEC +#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + +#undef CC1_SPEC +#define CC1_SPEC "%{profile:-p}" +#warning "Ignoring original CC1 spec" +#if 0 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p} %{!fno-pic: \ + %{!mno-pic: %{!fpic: %{!fPIC:-fPIC}}} \ + %{!mindirect: %{!mno-indirect:-mNO-INDIREct}}} \ + %{mno-pic: -fno-pic -mindirect} \ + %{fno-pic: \ + %{!mindirect: %{!mno-indirect:-mindirect}}}" +#endif /* 0 */ + +#define CC1PLUS_SPEC CC1_SPEC + +/* Provide a LINK_SPEC appropriate for Linux. Here we provide support + for the special GCC options -static and -shared, which allow us to + link things in one of these three modes by applying the appropriate + combinations of options at link-time. We like to support here for + as many of the other GNU linker options as possible. But I don't + have the time to search for those flags. I am sure how to add + support for -soname shared_object_name. H.J. + + I took out %{v:%{!V:-V}}. It is too much :-(. They can use + -Wl,-V. + + When the -shared link option is used a final link is not being + done. */ + +/* If ELF is the default format, we should not use /lib/elf. */ +/* we do not support libc5 */ + +#undef LINK_SPEC +#define LINK_SPEC "-m elf32vax %{shared:-shared} \ + %{!shared: \ + %{!ibcs: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{static:-static}}}" + + +/* Make gcc agree with <machine/ansi.h> */ + +#undef SIZE_TYPE +#define SIZE_TYPE "unsigned int" + +#undef PTRDIFF_TYPE +#define PTRDIFF_TYPE "int" + +#undef WCHAR_TYPE +#define WCHAR_TYPE "int" + +#undef WCHAR_TYPE_SIZE +#define WCHAR_TYPE_SIZE 32 + +/* Until they use ELF or something that handles dwarf2 unwinds + and initialization stuff better. */ +#undef DWARF2_UNWIND_INFO +#define DWARF2_UNWIND_INFO 0 + +#undef ASM_COMMENT_START +#define ASM_COMMENT_START "#" + +/* svr4.h defines ASM_OUTPUT_CASE_LABEL as calling the + ASM_OUTPUT_BEFORE_CASE_LABEL and ASM_OUTPUT_INTERNAL_LABEL + macros in turn. This causes a .align 2 to be inserted between the + CASEx instruction and the jump table. This is Not Good. + Undefining ASM_OUTPUT_CASE_LABEL altogether, causes the compiler + to fallback to ASM_OUPUT_INTERNAL_LABEL which is what we want. */ + +#undef ASM_OUTPUT_CASE_LABEL + +/* How to renumber registers for dbx and gdb. + Vax needs no change in the numeration. */ +/* This is repeated here, because it gets undefined in <svr4.h> */ + +#define DBX_REGISTER_NUMBER(REGNO) (REGNO) diff -Nur some_gcc/gcc-HEAD-20040515/gcc/config/vax/pic.h gcc-HEAD-20040515/gcc/config/vax/pic.h --- some_gcc/gcc-HEAD-20040515/gcc/config/vax/pic.h 1970-01-01 01:00:00.000000000 +0100 +++ gcc-HEAD-20040515/gcc/config/vax/pic.h 2004-05-15 18:54:54.000000000 +0200 @@ -0,0 +1,55 @@ +/* pic support routines Contributed by Andy Phillips, + atp at mssl.ucl.ac.uk March 1999 + + i386 implementation used as template + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#undef REGISTER_PREFIX +#define REGISTER_PREFIX "%" + +#undef VAX_ISTREAM_SYNC +#define VAX_ISTREAM_SYNC "movpsl -(%sp)\n\tpushal 1(%pc)\n\trei" + +#undef TARGET_GAS +#define TARGET_GAS (1) + +#undef TARGET_DEFAULT +#define TARGET_DEFAULT 0 + +#define TARGET_MEM_FUNCTIONS + +/* Function CSE screws up PLT .vs. GOT usage. + * */ +#define NO_FUNCTION_CSE + +/* This makes use of a hook in varasm.c to mark all external functions + * for us. We use this to make sure that external functions are correctly + * referenced from the PLT. */ + +#define NO_EXTERNAL_INDIRECT_ADDRESS + +/* Output assembler code to FILE to increment profiler label # LABELNO + for profiling a function entry. */ +/* overrides default definition in vax.h */ + +#undef FUNCTION_PROFILER +#define FUNCTION_PROFILER(FILE, LABELNO) \ + asm_fprintf (FILE, "\tmovab .LP%d,%Rr0\n\tjsb __mcount\n", (LABELNO)) + +#define TARGET_DEBUG_ADDR 0 diff -Nur some_gcc/gcc-HEAD-20040515/gcc/config/vax/vax.c gcc-HEAD-20040515/gcc/config/vax/vax.c --- some_gcc/gcc-HEAD-20040515/gcc/config/vax/vax.c 2004-03-06 22:14:50.000000000 +0100 +++ gcc-HEAD-20040515/gcc/config/vax/vax.c 2004-05-15 18:54:54.000000000 +0200 @@ -53,6 +53,7 @@ static int vax_rtx_costs_1 (rtx, enum rtx_code, enum rtx_code); static bool vax_rtx_costs (rtx, int, int, int *); static rtx vax_struct_value_rtx (tree, int); +static void vax_encode_section_info (tree, rtx, int first); /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP @@ -85,6 +86,9 @@ #undef TARGET_STRUCT_VALUE_RTX #define TARGET_STRUCT_VALUE_RTX vax_struct_value_rtx +#undef TARGET_ENCODE_SECTION_INFO +#define TARGET_ENCODE_SECTION_INFO vax_encode_section_info + struct gcc_target targetm = TARGET_INITIALIZER; /* Set global variables as needed for the options enabled. */ @@ -789,6 +793,25 @@ return gen_rtx_REG (Pmode, VAX_STRUCT_VALUE_REGNUM); } +static void +vax_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) +{ + if (!flag_pic) + return; + + if (TARGET_DEBUG_ADDR && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd') { + fprintf (stderr, "Encode %s, public = %d\n", + IDENTIFIER_POINTER (DECL_NAME (decl)), + TREE_PUBLIC (decl)); + } + + if (GET_CODE (rtl) == MEM) { + SYMBOL_REF_FLAG (XEXP (rtl, 0)) = + (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' || !TREE_PUBLIC (decl)); + } +} + + /* Worker function for NOTICE_UPDATE_CC. */ void diff -Nur some_gcc/gcc-HEAD-20040515/gcc/config.gcc gcc-HEAD-20040515/gcc/config.gcc --- some_gcc/gcc-HEAD-20040515/gcc/config.gcc 2004-05-03 23:27:42.000000000 +0200 +++ gcc-HEAD-20040515/gcc/config.gcc 2004-05-15 18:54:54.000000000 +0200 @@ -2023,6 +2023,11 @@ tm_file="${tm_file} vax/ultrix.h" use_fixproto=yes ;; +vax-*-linux*) # VAXen running Linux + tm_file="${tm_file} elfos.h linux.h vax/elf.h vax/pic.h vax/linux.h" + tmake_file="t-slibgcc-elf-ver t-linux vax/t-linux" + #extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + ;; xscale-*-elf) tm_file="arm/xscale-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" tmake_file=arm/t-xscale-elf --- gcc-HEAD/gcc/config/vax/vax.c~pre_hack 2004-05-27 14:01:22.000000000 +0200 +++ gcc-HEAD/gcc/config/vax/vax.c 2004-05-27 14:02:09.000000000 +0200 @@ -706,6 +706,8 @@ while (*fmt++ == 'e') { register rtx op = XEXP (x, i++); + if (!op) /* FIXME I think op should NEVER EVER be NULL ... */ + return c + 5; code = GET_CODE (op); /* A NOT is likely to be found as the first operand of an AND |
From: Jan-Benedict G. <jb...@us...> - 2004-05-27 14:37:38
|
Update of /cvsroot/linux-vax/toolchain/experimental_toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11552/experimental_toolchain Log Message: Directory /cvsroot/linux-vax/toolchain/experimental_toolchain added to the repository |
From: Jan-Benedict G. <jb...@us...> - 2004-05-27 12:45:56
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20946 Modified Files: experimental_toolchain.sh Log Message: - For now, also copy config.guess because currently, Dan hardcoded it's path into crosstool.sh. However, the plan is to supply $BUILD from outside, so I've already sent a patch... - Also, I'm just putting in a small patch to the gcc patchset (still on my website, I'd really check it into CVS RSN!) to not let the SIGSEGV during compilation of check_fds.c happen. This was due to wrong code in ./gcc-HEAD/gcc/config/vax/vax.c, at round line 709. The second line after the opening '{' makes it die, bt a fast 'return c+5;' makes it survive. Andy, could you have a look at that? Index: experimental_toolchain.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/experimental_toolchain.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- experimental_toolchain.sh 19 May 2004 09:15:02 -0000 1.1 +++ experimental_toolchain.sh 27 May 2004 12:45:35 -0000 1.2 @@ -35,6 +35,19 @@ # $Id$ # # $Log$ +# Revision 1.2 2004/05/27 12:45:35 jbglaw +# - For now, also copy config.guess because currently, Dan hardcoded it's +# path into crosstool.sh. However, the plan is to supply $BUILD from +# outside, so I've already sent a patch... +# - Also, I'm just putting in a small patch to the gcc patchset (still on +# my website, I'd really check it into CVS RSN!) to not let the SIGSEGV +# during compilation of check_fds.c happen. This was due to wrong code +# in ./gcc-HEAD/gcc/config/vax/vax.c, at round line 709. The second line +# after the opening '{' makes it die, bt a fast 'return c+5;' makes it +# survive. +# +# Andy, could you have a look at that? +# # Revision 1.1 2004/05/19 09:15:02 jbglaw # - Script and README to build a vax-linux toolchain from all HEAD sources. # - Currently capable of creating a Kernel-only cross-compiler, but glibc @@ -56,7 +69,7 @@ set -e -set -x +# set -x while [ $# -ne 0 ]; do case "${1}" in @@ -173,6 +186,10 @@ tar xzf crosstool_current.tar.gz cp crosstool-*/crosstool.sh "${GLOBAL_BASE_DIR}" chmod +x "${GLOBAL_BASE_DIR}/crosstool.sh" + # + # This'll go away after Dan applied the patch I sent him:) + # + cp crosstool-*/config.guess "${GLOBAL_BASE_DIR}" |
From: Jan-Benedict G. <jb...@us...> - 2004-05-19 09:17:48
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22311 Modified Files: experimental_toolchain.README Log Message: - Mention upcoming Canadian Cross support. Index: experimental_toolchain.README =================================================================== RCS file: /cvsroot/linux-vax/toolchain/experimental_toolchain.README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- experimental_toolchain.README 19 May 2004 09:15:02 -0000 1.1 +++ experimental_toolchain.README 19 May 2004 09:17:34 -0000 1.2 @@ -34,5 +34,13 @@ this task:) +Additional Notes +~~~~~~~~~~~~~~~~ +Dan Kegel started to investigate in how to do a Canadian Cross. This +means that this script should, at some point of time, be capable of +also generating a vax-linux hosted native compiler for vax-linux. But +prior that, we need to fix bugs in GCC and glibc... + + May 19, 2004, Jan-Benedict Glaw <jb...@lu...> |
From: Jan-Benedict G. <jb...@us...> - 2004-05-19 09:15:18
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21462 Added Files: experimental_toolchain.README experimental_toolchain.sh Log Message: - Script and README to build a vax-linux toolchain from all HEAD sources. - Currently capable of creating a Kernel-only cross-compiler, but glibc is not yet built fully (due to glibc/gcc bugs). - I suppose that this GCC isn't all _that_ useful, but the generated .o files at least contain VAX assembly:) Maybe some parts are even really useable. I'll try to verify that by linking 2.95.2 code with 3.5.0 code (just by adding more and more gcc-HEAD compiled .o files into kernel link run) to see if it instantly breaks... --- NEW FILE: experimental_toolchain.sh --- #!/bin/sh # # This script will attempt to # # - Download a lot of things # - Create releases of gcc + binutils # - Unpack gcc / binutils # - Patch everything # - Build most of a toolchain from it # # Bugs: # # - This script is highly sub-optimal wrt. download size. # - It doesn't finish completely because vax-linux isn't yet # fully supported :-( # - To checkout binutils, you (once) have to run # cvs -d :pserver:an...@so...:/cvs/src login # Password is "anoncvs". # - Checkouts of GCC are only available via ssh transport. So # ssh may ask you (once) to confirm FSF's host key with "yes". # - To checkout binutils, you (once) have to run # cvs -d :pserver:an...@so...:/cvs/glibc login # Password is "anoncvs". # - To checkout the Linux kernel, you (once) have to run # cvs -d:pserver:ano...@cv...:/cvsroot/linux-vax login # Password is empty, "", nada, ... # - You need to have /usr/share/misc/config.guess . Get that from # GNU's config package... # - You may want to set MAKE_FLAGS to "-j2" if you're the happy # owner of a dual CPU machine... # # # # $Id: experimental_toolchain.sh,v 1.1 2004/05/19 09:15:02 jbglaw Exp $ # # $Log: experimental_toolchain.sh,v $ # Revision 1.1 2004/05/19 09:15:02 jbglaw # - Script and README to build a vax-linux toolchain from all HEAD sources. # - Currently capable of creating a Kernel-only cross-compiler, but glibc # is not yet built fully (due to glibc/gcc bugs). # - I suppose that this GCC isn't all _that_ useful, but the generated .o # files at least contain VAX assembly:) Maybe some parts are even really # useable. I'll try to verify that by linking 2.95.2 code with 3.5.0 # code (just by adding more and more gcc-HEAD compiled .o files into # kernel link run) to see if it instantly breaks... # # # MAKE_FLAGS="-j2" MAKE_FLAGS="" GLOBAL_BASE_DIR= INSTALL_DIR= DO_PREPARE=0 DO_BUILD=0 set -e set -x while [ $# -ne 0 ]; do case "${1}" in -d|--download|-p|--prepare) DO_PREPARE=1;; -b|--build|-i|--install) DO_BUILD=1;; *) if [ -z "${GLOBAL_BASE_DIR}" ]; then GLOBAL_BASE_DIR="${1}" else INSTALL_DIR="${1}" fi;; esac shift done [ "${DO_PREPARE}" -eq 1 ] && echo "$0: Will download and prepare sources" [ "${DO_BUILD}" -eq 1 ] && echo "$0: Will create a cross-compiler and install it" [ -n "${GLOBAL_BASE_DIR}" ] && echo "$0: Will use ${GLOBAL_BASE_DIR} for temporary storage" [ -n "${INSTALL_DIR}" ] && echo "$0: Will install to ${INSTALL_DIR}" if [ -z "${GLOBAL_BASE_DIR}" -o -z "${INSTALL_DIR}" ]; then echo "$0 [--prepare] [--install] <tempdir> <installdir>" >&2 exit 1 fi GLOBAL_BASE_DIR="`cd "${GLOBAL_BASE_DIR}"; pwd`" INSTALL_DIR="`cd "${INSTALL_DIR}"; pwd`" # # Where do we find things? # PREP_DIR="${GLOBAL_BASE_DIR}/prepare" LOCAL_SRC_DIR="${GLOBAL_BASE_DIR}/source" BLD_DIR="${GLOBAL_BASE_DIR}/build" if [ "${DO_PREPARE}" -eq 1 ]; then # # Prepare directories # mkdir -p "${PREP_DIR}" mkdir -p "${LOCAL_SRC_DIR}" mkdir -p "${BLD_DIR}" # # Prepare binutils. # # I had a hard time trying to directly build a binutils CVS co. I failed. # My current approach is to do a checkout, then build a release tar-bz2 from # it and unpack this. *That* actually will work. # cd "${PREP_DIR}" cvs -z 9 -d :pserver:an...@so...:/cvs/src co binutils cd src make -f src-release binutils.tar.bz2 cd "${LOCAL_SRC_DIR}" tar xjf ${PREP_DIR}/src/binutils-*.tar.bz2 mv binutils-* binutils-HEAD # # Prepare GCC. # # GCC is quite like binutils. I haven't figured out how to build it off a # checked-out CVS tree. So I first build a release from it. # # The release script does have another problem: it doesn't use the local # CVS sandbox, but calls cvs on it's own to create a fresh sandbox. To save # some bandwidth, I first download the release script, then call it. # # Additionally, the release script uses wrong CVS server name and repository # path... # cd "${PREP_DIR}" wget -O gcc_release.0 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gcc/gcc/maintainer-scripts/gcc_release?rev=HEAD&content-type=text/plain' cat gcc_release.0 | sed -e 's#^CVS_SERVER.*#CVS_SERVER="savannah.gnu.org"#' > gcc_release.1 cat gcc_release.1 | sed -e 's#^CVS_REPOSITORY.*#CVS_REPOSITORY="/cvsroot/gcc"#' > gcc_release chmod +x gcc_release mkdir -p "${PREP_DIR}/gcc" ./gcc_release -s HEAD:HEAD -d "${PREP_DIR}/gcc" -u anoncvs sources tarfiles cd "${LOCAL_SRC_DIR}" tar xjf ${PREP_DIR}/gcc/*/gcc-HEAD-*.tar.bz2 mv gcc-* gcc-HEAD # # Prepare glibc. # # Preparing glibc sources is actually an easy task. Just check it out, # then remove the nptl* directories (these won't probably work yet for # vax-linux, but I may need to verify that again. It's from ages where # we had no current GCC at hand...). # cd "${PREP_DIR}" cvs -z 9 -d :pserver:an...@so...:/cvs/glibc co libc mkdir -p "${LOCAL_SRC_DIR}/glibc-HEAD" (cd libc && tar cf - . ;) | (cd "${LOCAL_SRC_DIR}/glibc-HEAD" && tar xf -;) cd "${LOCAL_SRC_DIR}/glibc-HEAD" rm -rf nptl* # # Download current crosstool scripts. We only need crosstool.sh, though... # cd "${PREP_DIR}" wget -O crosstool_website.html http://www.kegel.com/crosstool/ CT_URL="`cat crosstool_website.html | grep crosstool- | tail -n 1 | sed -e 's#.*\(http://[a-z0-9./-]*\).*#\1#'`" wget -O crosstool_current.tar.gz "${CT_URL}" tar xzf crosstool_current.tar.gz cp crosstool-*/crosstool.sh "${GLOBAL_BASE_DIR}" chmod +x "${GLOBAL_BASE_DIR}/crosstool.sh" # # Get current VAX Linux Kernel v2.6.x from CVS # cd "${PREP_DIR}" cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co kernel-2.5 mkdir -p "${LOCAL_SRC_DIR}/linux-HEAD" (cd kernel-2.5 && tar cf - . ;) | (cd "${LOCAL_SRC_DIR}/linux-HEAD" && tar xf -;) cd "${LOCAL_SRC_DIR}/linux-HEAD" make ARCH=vax defconfig # # Now patch gcc and libc with current patches. binutils already work # out of the box:) # cd "${PREP_DIR}" wget http://lug-owl.de/~jbglaw/vax-linux-gcc.patch wget http://lug-owl.de/~jbglaw/vax-linux-libc.patch cd "${LOCAL_SRC_DIR}/gcc-HEAD" patch -p1 < "${PREP_DIR}/vax-linux-gcc.patch" cd "${LOCAL_SRC_DIR}/glibc-HEAD" patch -p1 < "${PREP_DIR}/vax-linux-libc.patch" fi # if [ "${DO_PREPARE}" -eq 1 ]; then # # This was the fun part. Now everything should (at least partially) # build:) Yeppee!!! # # This last step takes about 11min on my Athlon (2x 1.4GHz, 1.5GB RAM) # until building of GLIBC breaks due to compiler errors. # if [ "${DO_BUILD}" -eq 1 ]; then cd "${GLOBAL_BASE_DIR}" PREFIX="${INSTALL_DIR}" \ BUILD_DIR="${BLD_DIR}" \ SRC_DIR="${LOCAL_SRC_DIR}" \ BINUTILS_DIR=binutils-HEAD \ GCC_DIR=gcc-HEAD \ GLIBC_DIR=glibc-HEAD \ LINUX_DIR=linux-HEAD \ TARGET=vax-linux \ TARGET_CFLAGS="-O -g" \ BUILD=`/usr/share/misc/config.guess` \ USE_SYSROOT=yes \ PARALLELMFLAGS="${MAKE_FLAGS}" ./crosstool.sh fi # if [ "${DO_BUILD}" -eq 1 ]; then --- NEW FILE: experimental_toolchain.README --- Quick-Start ~~~~~~~~~~~ ~$ mkdir opt ~$ mkdir /tmp/to_be_removed ~$ ./experimental_toolchain.sh -d -i /tmp/to_be_removed opt Space Requirements ~~~~~~~~~~~~~~~~~~ As far as the build process proceeds right now, you have to have about 60MB free space in the install directory (~/opt in the example above) and about 1.6GB for the temporary directory. Needed space will raise somewhat while glibc (or GCC) gets fixed, of course... Theory fo Operation ~~~~~~~~~~~~~~~~~~~ If you call it with -d/--download/-p/--prepare, the script will try to download all current HEAD versions of binutils, gcc, glibc and the vax-linux kernel, as well as patches to gcc and glibc and the crosstool scripts (by Dan Kegel). If called with -i/--install/-b/--build, it'll take the prepared sources and try to build a vax-linux toolchain. Currently, it breaks while compiling parts of glibc, but you'll see that it build a vax-linux-gcc up to that point, that can be used (somewhat) to compile the Linux kernel. Please note that this GCC is of quite limited use right now. It omits some (serious?) warnings during kernel compile, can't actually compile glibc and I suppose that it contains quite a lot of bugs. However, it's a *start* (albeit hackish), but I hope that others help to finish this task:) May 19, 2004, Jan-Benedict Glaw <jb...@lu...> |
From: <ai...@us...> - 2003-12-03 23:16:25
|
Update of /cvsroot/linux-vax/toolchain/src/gas/testsuite/gas/vax In directory sc8-pr-cvs1:/tmp/cvs-serv22212 Modified Files: quad.exp Log Message: additional fix from Nick Clifton from binutils main tree Index: quad.exp =================================================================== RCS file: /cvsroot/linux-vax/toolchain/src/gas/testsuite/gas/vax/quad.exp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- quad.exp 17 Feb 2003 00:07:29 -0000 1.1.1.1 +++ quad.exp 3 Dec 2003 23:16:22 -0000 1.2 @@ -4,7 +4,7 @@ set x2 0 set x3 0 set file "quad.s" - if [istarget vax-*-*elf*] { + if { [istarget vax-*-*elf*] || [istarget vax-*-linux-gnu*] } then { set file "quad_elf.s" } gas_start $file "-al" |
From: <jb...@us...> - 2003-11-14 23:46:37
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv13645 Modified Files: build-native-compiler.sh Log Message: - Add the path to the vax-dec-linux-* binaries to $PATH *before* trying to use it. It did work for me only because there was already some (other) vax-dev-linux-* toolchain in my $PATH ... Index: build-native-compiler.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/build-native-compiler.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- build-native-compiler.sh 14 Nov 2003 07:42:01 -0000 1.3 +++ build-native-compiler.sh 14 Nov 2003 23:46:32 -0000 1.4 @@ -99,6 +99,7 @@ # have some values set to non-standard values. So I'll override them and # reload the .config file. # +export PATH="${PATH}:${CROSSTOOLS_INSTALL}/bin" cd "${UCLIBC}" [ -e .config ] && rm -f .config make defconfig @@ -124,7 +125,6 @@ # # Build native compiler # -export PATH="${PATH}:${CROSSTOOLS_INSTALL}/bin" cd "${TOOLCHAIN}" [ -e "${TOOLCHAIN}/b-vax-native" ] && rm -rf "${TOOLCHAIN}/b-vax-native" mkdir "${TOOLCHAIN}/b-vax-native" |
From: <jb...@us...> - 2003-11-14 07:47:54
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv23374 Modified Files: README Log Message: - build-native-compiler.sh needs to be modified to reflect local pathes... Index: README =================================================================== RCS file: /cvsroot/linux-vax/toolchain/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README 13 Nov 2003 16:35:22 -0000 1.1 +++ README 14 Nov 2003 07:47:50 -0000 1.2 @@ -12,5 +12,6 @@ This script first creates a cross-compiler (using build-vax.sh) and then tries to build uClibc support (then, you'll be able to build vax-linux userspace programs). At the last step, it'll try to build -glibc support, which may or may not work... +glibc support, which may or may not work... However, look at the +first lines of this script and adjust the pathes mentioned there! |
From: <jb...@us...> - 2003-11-14 07:42:04
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv22249 Modified Files: build-native-compiler.sh Log Message: - Correct recently introduced typo. Index: build-native-compiler.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/build-native-compiler.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- build-native-compiler.sh 13 Nov 2003 16:36:29 -0000 1.2 +++ build-native-compiler.sh 14 Nov 2003 07:42:01 -0000 1.3 @@ -148,5 +148,5 @@ --with-headers="${LINUX26}/include" --enable-add-ons \ --disable-profile --without-gd --without-fp make lib -make prefix="${NATIVE_ROOT_INSTALL} install" +make prefix="${NATIVE_ROOT_INSTALL}" install |
From: <jb...@us...> - 2003-11-14 07:41:13
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv21939 Modified Files: build-vax.sh Log Message: - Mention another file (./src/gcc/c-parse.c) which should be touched before build. Index: build-vax.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/build-vax.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- build-vax.sh 13 Nov 2003 16:26:37 -0000 1.2 +++ build-vax.sh 14 Nov 2003 07:41:08 -0000 1.3 @@ -141,6 +141,7 @@ # doing that, just to work out the *real* problem. # # touch ../src/gcc/c-gperf.h +# touch ../src/gcc/c-parse.c # echo "$0: compile binutils, gcc, and newlib." |
From: <jb...@us...> - 2003-11-13 16:36:32
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv20849 Modified Files: build-native-compiler.sh Log Message: - Add RCSsish %Id% (it's "$", of course8^P) . Index: build-native-compiler.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/build-native-compiler.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- build-native-compiler.sh 13 Nov 2003 16:30:39 -0000 1.1 +++ build-native-compiler.sh 13 Nov 2003 16:36:29 -0000 1.2 @@ -1,6 +1,8 @@ #!/bin/sh # +# $Id$ +# # This script tries to first build a cross-compiler, then we build # uClibc support for it. The last step then is to build glibc, # which may or may not work... You may give "force" as a command |
From: <jb...@us...> - 2003-11-13 16:35:26
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv20678 Added Files: README Log Message: - README for the two compiler build scripts. --- NEW FILE: README --- $Id: README,v 1.1 2003/11/13 16:35:22 jbglaw Exp $ build-vax.sh ~~~~~~~~~~~~ This script will generate a working cross compiler useable for doing Linux kernel compilation. Every vax-linux hacker will need it. If you're only interested in doing kernel work, it's all you need. build-native-compiler.sh ~~~~~~~~~~~~~~~~~~~~~~~~ This script first creates a cross-compiler (using build-vax.sh) and then tries to build uClibc support (then, you'll be able to build vax-linux userspace programs). At the last step, it'll try to build glibc support, which may or may not work... |
From: <jb...@us...> - 2003-11-13 16:30:42
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv19666 Added Files: build-native-compiler.sh Log Message: - Initial (public) version. --- NEW FILE: build-native-compiler.sh --- #!/bin/sh # # This script tries to first build a cross-compiler, then we build # uClibc support for it. The last step then is to build glibc, # which may or may not work... You may give "force" as a command # line argument to indicate that you don't need your .config files # any longer. Otherwise than that, we're expecting to see pristine # sources. # # Copyright (C) 2003 by Jan-Benedict Glaw <jb...@lu...> # # Use this script under the terms of the GNU General Public License, # Version 2. # # Nov 13, 2003: jbglaw - First public release # # # CVS sources # # Please notice that uClibc needs to have a patch applied to not # buils the linux-2.4.x style module loader interface. Look at # ./kernel-2.5/Documentation/vax/userland.txt for that patch... # TOOLCHAIN=/home/jbglaw/vax-linux/toolchain UCLIBC=/home/jbglaw/vax-linux/uClibc GLIBC=/home/jbglaw/vax-linux/glibc LINUX26=/home/jbglaw/vax-linux/kernel-2.5 # # Build/Target configuration # XX_TARGET=vax-dec-linux XX_BUILD=i386-linux # # Where to install? # CROSSTOOLS_INSTALL=/home/jbglaw/vax-linux/vax-cross-dev NATIVE_ROOT_INSTALL=/home/jbglaw/vax-linux/vax-native-dev # # # # # # Nothing to change below this line # # # # # set -e FORCE="" # # Force build? That is, we may drop .config files. # [ $# -gt 0 ] && [ "${1}" = "force" ] && FORCE=1 # # We need pristine source trees. That is, we expect that there # are *no* .config files, neither for uClibc, not for the # kernel itself because we're to overwrite them... # if ! [ "${FORCE}" = 1 ]; then if [ -e "${LINUX26}/.config" ]; then echo "There's a .config file in your linux-2.6 sources. I need pristine sources..." >&2 exit 1 fi if [ -e "${UCLIBC}/.config" ]; then echo "There's a .config file in your uClibc sources. I need pristine sources..." >&2 exit 1 fi fi # # Prepare kernel headers for uClibc # cd "${LINUX26}" [ -e .config ] && rm -f .config make ka650_defconfig make include/asm make include/linux/version.h # # Build C-only VAX cross-compiler # cd "${TOOLCHAIN}" ./build-vax.sh prefix="${CROSSTOOLS_INSTALL}" ./build-vax.sh install # # Build uClibc. We mostly want to use the "defconfig", but I prefer to # have some values set to non-standard values. So I'll override them and # reload the .config file. # cd "${UCLIBC}" [ -e .config ] && rm -f .config make defconfig echo "KERNEL_SOURCE=\"${LINUX26}\"" >> .config echo "DO_C99_MATH=y" >> .config echo "UCLIBC_HAS_WCHAR=y" >> .config echo "UCLIBC_HAS_THREADS=y" >> .config echo "PTHREADS_DEBUG_SUPPORT=n" >> .config echo "UCLIBC_HAS_IPV6=y" >> .config echo "UCLIBC_HAS_FULL_RPC=y" >> .config echo "SHARED_LIB_LOADER_PATH=\"/lib\"" >> .config echo "DEVEL_PREFIX=\"${CROSSTOOLS_INSTALL}\"" >> .config echo "SYSTEM_DEVEL_PREFIX=\"\$(DEVEL_PREFIX)\"" >> .config echo "DEVEL_TOOL_PREFIX=\"\$(DEVEL_PREFIX)/usr\"" >> .config make oldconfig make clean make CROSS="${XX_TARGET}-" make install make PREFIX="${NATIVE_ROOT_INSTALL}" install_target # # Build native compiler # export PATH="${PATH}:${CROSSTOOLS_INSTALL}/bin" cd "${TOOLCHAIN}" [ -e "${TOOLCHAIN}/b-vax-native" ] && rm -rf "${TOOLCHAIN}/b-vax-native" mkdir "${TOOLCHAIN}/b-vax-native" cd "${TOOLCHAIN}/b-vax-native" CC=vax-uclibc-gcc ../src/configure --host="${XX_TARGET}" \ --build="${XX_BUILD}" --target="${XX_TARGET}" \ --enable-languages=c --prefix=/usr make LDFLAGS=-lm make install prefix="${NATIVE_ROOT_INSTALL}/usr" # # Build glibc # cd "${TOOLCHAIN}" [ -e b-glibc ] && rm -rf b-glibc mkdir b-glibc cd b-glibc "${GLIBC}/configure" --host="${XX_TARGET}" --build="${XX_BUILD}" \ --with-headers="${LINUX26}/include" --enable-add-ons \ --disable-profile --without-gd --without-fp make lib make prefix="${NATIVE_ROOT_INSTALL} install" |
From: <jb...@us...> - 2003-11-13 16:26:41
|
Update of /cvsroot/linux-vax/toolchain In directory sc8-pr-cvs1:/tmp/cvs-serv18747 Modified Files: build-vax.sh Log Message: - Remove output redirection. This allows the script to catch build errors of the toolchain sources and to properly exit. - Add comment about c-gperf.h. Index: build-vax.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/build-vax.sh,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- build-vax.sh 16 Feb 2003 23:35:07 -0000 1.1.1.1 +++ build-vax.sh 13 Nov 2003 16:26:37 -0000 1.2 @@ -11,6 +11,7 @@ # # updated - atp July 2000 for binutils 2.10 gcc 2.95 + CVS # Updated - atp aug 2000 - add in prefix and clean command line options. +# Updated - jbglaw Nov 2003 - removed output redirection to catch build errors # # The script is invoked in the following manner: # sh build-vax.sh [install] --enable-maintainer-mode --enable-languages=c @@ -129,24 +130,32 @@ if [ ! -f configure.done ] then echo "$0: configure for $target." - ../src/configure $cmdline 2>&1 | tee configure.log + ../src/configure $cmdline touch configure.done fi +# +# FIXME: Due to CVS timestamp problems, moon phase, number of chickens +# sacrifice and other important evenst, ../src/gcc/c-gperf.h should be +# touch(1)ed to prevent it from being rebuilt. But for now, we're not +# doing that, just to work out the *real* problem. +# +# touch ../src/gcc/c-gperf.h +# + echo "$0: compile binutils, gcc, and newlib." #note, the LANGUAGES here is due to go away according to gcc docs. -make cross LANGUAGES=$langs 2>&1 | tee make.log +make cross LANGUAGES=$langs echo "$0: creating info files" -make info LANGUAGES=$langs 2>&1 | tee info.log +make info LANGUAGES=$langs # Compilation done, install if asked to do so. if [ x"$install" = xyes ] then echo "$0: installing binutils, gcc, and newlib in $prefix." - make install LANGUAGES=$langs 2>&1 | tee install.log + make install LANGUAGES=$langs fi - # Announce that we're finished. echo "$0: finished `date`" |
From: Dave A. <ai...@us...> - 2003-02-13 03:32:11
|
Update of /cvsroot/linux-vax/tools/src/gcc In directory sc8-pr-cvs1:/tmp/cvs-serv15545 Modified Files: Tag: tools-linuxvax-dynamic-dev jump.c Log Message: DA: fix for bug with inlining asm getting optimised out Index: jump.c =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/jump.c,v retrieving revision 2.10.0.1 retrieving revision 2.10.0.1.2.1 diff -u -r2.10.0.1 -r2.10.0.1.2.1 --- jump.c 21 Oct 1999 06:24:03 -0000 2.10.0.1 +++ jump.c 13 Feb 2003 03:32:08 -0000 2.10.0.1.2.1 @@ -3912,8 +3912,9 @@ { rtx part = XVECEXP (PATTERN (our_prev), 0, i); + /* Don't do it if asm volatile instruction - D.A. Linux/VAX */ if (GET_CODE (part) == SET - && SET_DEST (part) != XEXP (note, 0)) + && (SET_DEST (part) != XEXP (note, 0) || (GET_CODE(SET_SRC(part)) == ASM_OPERANDS && MEM_VOLATILE_P(SET_SRC(part))))) break; } |
From: Dave A. <ai...@us...> - 2003-02-13 03:27:41
|
Update of /cvsroot/linux-vax/tools/src/gcc/config/vax In directory sc8-pr-cvs1:/tmp/cvs-serv14201 Removed Files: Tag: tools-linuxvax-dynamic-dev asmbits.h Log Message: DA: remove not used --- asmbits.h DELETED --- |
From: Dave A. <ai...@us...> - 2003-02-13 03:25:56
|
Update of /cvsroot/linux-vax/tools/src/gcc/config/vax In directory sc8-pr-cvs1:/tmp/cvs-serv13250 Modified Files: Tag: tools-linuxvax-dynamic-dev linux.h pic.h vax.c vax.h Removed Files: Tag: tools-linuxvax-dynamic-dev pic.c Log Message: DA: cleaned up the dynamic dev pic stuff.. removed a lot of the changes made by Linux/VAX as they were mostly replacings similiar stuff made by the NetBSD stuff... only dodgy one is CALL_USED_REGS.. might switch back to Linux usage .. NetBSD has done r0-r5 for ages according to Matt, not sure why Index: linux.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/linux.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- linux.h 19 Oct 2002 11:33:39 -0000 1.1.2.1 +++ linux.h 13 Feb 2003 03:25:52 -0000 1.1.2.2 @@ -21,6 +21,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* temporary*/ #define inhibit_libc @@ -77,7 +78,7 @@ /* we do not support libc5 */ #undef LINK_SPEC -#define LINK_SPEC "-m elf_vax %{shared:-shared} \ +#define LINK_SPEC "-m elf32vax %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ @@ -109,28 +110,6 @@ #undef ASM_COMMENT_START #define ASM_COMMENT_START "#" - -/* This is how to output an element of a case-vector that is relative. - This is only used for PIC code. See comments by the `casesi' insn in - i386.md for an explanation of the expression this outputs. - - * FIXME: problem. i386 implements non-pic casesi with tablejmp, - * and uses casesi for PIC. vax has a better case instruction, - * so it is used. At the mo, since PIC is in bits, use the std non - * GOT casesi relative case vector. Else we get ELT's in a .rodata - * stuffed in the middle of code. - * - */ - -/* - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) -*/ -/* FIXME: PIC code in vax.md */ - -#undef ASM_OUTPUT_ADDR_DIFF_ELT -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word %s%d-%s%d\n", LPREFIX, VALUE, LPREFIX, REL) /* Indicate that jump tables (case instr) go in the text section. */ #define JUMP_TABLES_IN_TEXT_SECTION (1) Index: pic.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/pic.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- pic.h 24 Oct 2002 12:09:10 -0000 1.1.2.2 +++ pic.h 13 Feb 2003 03:25:52 -0000 1.1.2.3 @@ -20,31 +20,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Stubs for half-pic support if not OSF/1 reference platform. */ - -#ifndef HALF_PIC_P -#define HALF_PIC_P() 0 -#define HALF_PIC_NUMBER_PTRS 0 -#define HALF_PIC_NUMBER_REFS 0 -#define HALF_PIC_ENCODE(DECL) -#define HALF_PIC_DECLARE(NAME) -#define HALF_PIC_INIT() error ("half-pic init called on systems that don't support it.") -#define HALF_PIC_ADDRESS_P(X) 0 -#define HALF_PIC_PTR(X) X -#define HALF_PIC_FINISH(STREAM) -#endif - -/* Macro to conditionally modify fixed_regs/call_used_regs. */ -#define CONDITIONAL_REGISTER_USAGE \ - { \ - if (flag_pic) \ - { \ - fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ - call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ - } \ - } +#undef TARGET_GAS +#define TARGET_GAS (1) +#undef TARGET_DEFAULT +#define TARGET_DEFAULT 0 +#define TARGET_MEM_FUNCTIONS /* Function CSE screws up PLT .vs. GOT usage. * */ @@ -56,44 +38,13 @@ #define NO_EXTERNAL_INDIRECT_ADDRESS -/* Register to hold the addressing base for position independent - * code access to data items. - * This is r10 on vaxes. There is no ABI, so its r10 'cos I say so. */ -#define PIC_OFFSET_TABLE_REGNUM 10 - -/* This macro generates the assembly code for function entry. - FILE is a stdio stream to output the code to. - SIZE is an int: how many units of temporary storage to allocate. - Refer to the array `regs_ever_live' to determine which registers - to save; `regs_ever_live[I]' is nonzero if register number I - is ever used in the function. This macro is responsible for - knowing which registers should not be saved even if used. */ -/* overrides default definition in vax.h */ - -#undef FUNCTION_PROLOGUE -#define FUNCTION_PROLOGUE(FILE, SIZE) \ - function_prologue (FILE, SIZE) - /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ /* overrides default definition in vax.h */ #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ -{ \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tmovab %sP%d@GOTOFF(r10),r0\n", \ - LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tjsb *mcount@GOT(r10)\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tmovab %sP%d,r0\n", LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tjsb mcount\n"); \ - } \ -} - + asm_fprintf (FILE, "\tmovab .LP%d,%Rr0\n\tjsb __mcount\n", (LABELNO)) /* There are three profiling modes for basic blocks available. The modes are selected at compile time by using the options @@ -125,51 +76,6 @@ */ /* we dont support profile_block_flag == 2, PIC makes this more complex */ -#undef FUNCTION_BLOCK_PROFILER -#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ -{ \ - /* might be an idea to use RTX expressions here like i386 */ \ - if (!flag_pic) { \ - /* contents of function block profiler from vax.h */ \ - /* not very efficient, but clearer FIXME: later */ \ - fprintf(FILE, "\ttstl %sPBX0\n",LPREFIX); \ - fprintf(FILE, "\tjneq %sPI%d\n",LPREFIX, (LABELNO)); \ - fprintf(FILE, "\tpushal %sPBX0\n",LPREFIX); \ - fprintf(FILE, "\tcalls $1,__bb_init_func\n%sPI%d:\n", LPREFIX, (LABELNO)); \ - } else { \ - /* pic version */ \ - fprintf(FILE, "\ttstl %sPBX0@GOTOFF(r10)\n",LPREFIX); \ - fprintf(FILE, "\tjneq %sPI%d@GOT\n",LPREFIX, (LABELNO)); \ - fprintf(FILE, "\tpushal %sPBX0@GOTOFF(r10)\n",LPREFIX); \ - fprintf(FILE, "\tcalls $1,__bb_init_func@PLT\n%sPI%d:\n", LPREFIX, (LABELNO)); \ - } \ -} - -/* Output assembler code to FILE to increment the entry-count for - the BLOCKNO'th basic block in this source file. This is a real pain in the - sphincter on a VAX, since we do not want to change any of the bits in the - processor status word. The way it is done here, it is pushed onto the stack - before any flags have changed, and then the stack is fixed up to account for - the fact that the instruction to restore the flags only reads a word. - It may seem a bit clumsy, but at least it works. -*/ -/* no support for profile_block_flag == 2 */ - -#undef BLOCK_PROFILER -#define BLOCK_PROFILER(FILE, BLOCKNO) \ -{ \ - if (!flag_pic) { \ - /* as before from vax.h */ \ - fprintf (FILE, "\tmovpsl -(sp)\n\tmovw (sp),2(sp)\n\taddl2 $2,sp\n\taddl2 $1,%sPBX2+%d\n\tbicpsw $255\n\tbispsw (sp)+\n", \ - LPREFIX, (4 * BLOCKNO)); \ - } else { \ - /* pic version */ \ - fprintf(FILE,"\tmovpsl -(sp)\n\tmovw (sp),2(sp)\n\taddl2 $2,sp\n"); \ - fprintf(FILE,"\taddl2 $1,%sPBX2@GOTOFF+%d(r10)\n", LPREFIX, (4 * BLOCKNO)); \ - fprintf(FILE,"\tbicpsw $255\n\tbispsw (sp)+\n"); \ - } \ -} - /* The following macro shall output assembler code to FILE to indicate a return from function during basic-block profiling. @@ -179,25 +85,6 @@ #define FUNCTION_BLOCK_PROFILER_EXIT(FILE) {} -/* This macro generates the assembly code for function exit, - on machines that need it. If FUNCTION_EPILOGUE is not defined - then individual return instructions are generated for each - return statement. Args are same as for FUNCTION_PROLOGUE. - - The function epilogue should not depend on the current stack pointer! - It should use the frame pointer only. This is mandatory because - of alloca; we also take advantage of it to omit stack adjustments - before returning. - - If the last non-note insn in the function is a BARRIER, then there - is no need to emit a function prologue, because control does not fall - off the end. This happens if the function ends in an "exit" call, or - if a `return' insn is emitted directly into the function. */ - -#undef FUNCTION_EPILOGUE -#define FUNCTION_EPILOGUE(FILE, SIZE) \ - function_epilogue (FILE, SIZE) - #define TARGET_DEBUG_ADDR 0 /* Define this macro if references to a symbol must be treated differently depending on something about the variable or @@ -232,48 +119,14 @@ } \ while (0) -/* The `FINALIZE_PIC' macro serves as a hook to emit these special - codes once the function is being compiled into assembly code, but - not before. (It is not done before, because in the case of - compiling an inline function, it would lead to multiple PIC - prologues being included in functions which used inline functions - and were compiled to assembly language.) */ - -#define FINALIZE_PIC \ -do \ - { \ - extern int current_function_uses_pic_offset_table; \ - \ - current_function_uses_pic_offset_table |= profile_flag | profile_block_flag; \ - } \ -while (0) - -/* these two are overridden by routines in pic.c */ -/*#undef PRINT_OPERAND - *#define PRINT_OPERAND(FILE, X, CODE) \ - * vax_print_operand (FILE, X, CODE) - * - *#undef PRINT_OPERAND_ADDRESS - *#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - * vax_print_operand_address (FILE, ADDR) - */ - /* Put relocations in the constant pool in the writable data section. */ #undef SELECT_RTX_SECTION #define SELECT_RTX_SECTION(MODE,RTX) \ { \ if (flag_pic && vax_symbolic_operand ((RTX), (MODE))) \ data_section (); \ - else \ - readonly_data_section (); \ + else \ + readonly_data_section (); \ } -/* externals */ - -extern void function_prologue (); -extern void function_epilogue (); - -/*extern void print_operand (); - *extern void print_operand_address (); - */ Index: vax.c =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.c,v retrieving revision 2.12.2.2 retrieving revision 2.12.2.3 diff -u -r2.12.2.2 -r2.12.2.3 --- vax.c 17 Oct 2002 13:17:21 -0000 2.12.2.2 +++ vax.c 13 Feb 2003 03:25:52 -0000 2.12.2.3 @@ -1259,4 +1259,3 @@ #endif /* VMS */ -#include "pic.c" Index: vax.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.h,v retrieving revision 2.17.2.6 retrieving revision 2.17.2.7 diff -u -r2.17.2.6 -r2.17.2.7 --- vax.h 24 Oct 2002 12:09:10 -0000 2.17.2.6 +++ vax.h 13 Feb 2003 03:25:52 -0000 2.17.2.7 @@ -182,8 +182,8 @@ and the register where structure-value addresses are passed. Aside from that, you can include as many other registers as you like. */ /* test - comply with vax proc calling standard, */ -#define CALL_USED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1} -/*#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}*/ +/* #define CALL_USED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1} */ +#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1} /* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. --- pic.c DELETED --- |
From: Dave A. <ai...@us...> - 2002-10-26 11:38:10
|
Update of /cvsroot/linux-vax/tools/src/ld/emulparams In directory usw-pr-cvs1:/tmp/cvs-serv15352 Modified Files: Tag: tools-linuxvax-dynamic-dev elf_vax.sh Log Message: DA: get branch up to HEAD Index: elf_vax.sh =================================================================== RCS file: /cvsroot/linux-vax/tools/src/ld/emulparams/elf_vax.sh,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- elf_vax.sh 26 Jul 2000 23:17:06 -0000 1.1 +++ elf_vax.sh 26 Oct 2002 11:38:06 -0000 1.1.2.1 @@ -1,8 +1,8 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-vax" -TEXT_START_ADDR=0x08048000 +TEXT_START_ADDR=0x1000 MAXPAGESIZE=0x1000 -NONPAGED_TEXT_START_ADDR=0x08048000 +NONPAGED_TEXT_START_ADDR=0x1000 ARCH=vax MACHINE= NOP=0x0101 |
From: Dave A. <ai...@us...> - 2002-10-24 12:09:18
|
Update of /cvsroot/linux-vax/tools/src/gcc/config/vax In directory usw-pr-cvs1:/tmp/cvs-serv18982 Modified Files: Tag: tools-linuxvax-dynamic-dev pic.h vax.h Log Message: DA: final changes from NetBSD.. define some things from them for PIC compiles my test object now .. time for kernel test again Index: pic.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/pic.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- pic.h 19 Oct 2002 11:33:39 -0000 1.1.2.1 +++ pic.h 24 Oct 2002 12:09:10 -0000 1.1.2.2 @@ -44,6 +44,18 @@ } \ } + + +/* Function CSE screws up PLT .vs. GOT usage. + * */ +#define NO_FUNCTION_CSE + +/* This makes use of a hook in varasm.c to mark all external functions + * for us. We use this to make sure that external functions are correctly + * referenced from the PLT. */ + +#define NO_EXTERNAL_INDIRECT_ADDRESS + /* Register to hold the addressing base for position independent * code access to data items. * This is r10 on vaxes. There is no ABI, so its r10 'cos I say so. */ @@ -210,9 +222,12 @@ TREE_PUBLIC (DECL)); \ } \ \ + if (GET_CODE (rtl) == MEM) \ + { \ SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ || ! TREE_PUBLIC (DECL)); \ + }\ } \ } \ while (0) Index: vax.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.h,v retrieving revision 2.17.2.5 retrieving revision 2.17.2.6 diff -u -r2.17.2.5 -r2.17.2.6 --- vax.h 19 Oct 2002 11:33:39 -0000 2.17.2.5 +++ vax.h 24 Oct 2002 12:09:10 -0000 2.17.2.6 @@ -1253,13 +1253,32 @@ (The Vax does not use such vectors, but we must define this macro anyway.) */ -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.long L%d\n", VALUE) +#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ + do \ + { \ + char label[256]; \ + ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \ + fprintf (FILE, "\t.long "); \ + assemble_name (FILE, label); \ + fprintf (FILE, "\n"); \ + } \ + while (0) /* This is how to output an element of a case-vector that is relative. */ -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word L%d-L%d\n", VALUE, REL) +#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ + do \ + { \ + char label[256]; \ + ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \ + fprintf (FILE, "\t.word "); \ + assemble_name (FILE, label); \ + ASM_GENERATE_INTERNAL_LABEL (label, "L", (REL)); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, label); \ + fprintf (FILE, "\n"); \ + } \ + while (0) /* This is how to output an assembler line that says to advance the location counter |
From: Dave A. <ai...@us...> - 2002-10-19 11:33:46
|
Update of /cvsroot/linux-vax/tools/src/gcc/config/vax In directory usw-pr-cvs1:/tmp/cvs-serv8441 Modified Files: Tag: tools-linuxvax-dynamic-dev linux.h pic.h vax.h vax.md Log Message: DA: update spec file in linux.h to include PIC flags, merged PIC code from NetBSD into machine description.. probably not much else I can do until I get to a VAX Index: linux.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/linux.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- linux.h 26 Jul 2000 23:17:06 -0000 1.1 +++ linux.h 19 Oct 2002 11:33:39 -0000 1.1.2.1 @@ -50,7 +50,14 @@ #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #undef CC1_SPEC -#define CC1_SPEC "%(cc1_cpu) %{profile:-p}" +#define CC1_SPEC "%(cc1_cpu) %{profile:-p} %{!fno-pic: \ + %{!mno-pic: %{!fpic: %{!fPIC:-fPIC}}} \ + %{!mindirect: %{!mno-indirect:-mno-indirect}}} \ + %{mno-pic: -fno-pic -mindirect} \ + %{fno-pic: \ + %{!mindirect: %{!mno-indirect:-mindirect}}}" + +#define CC1PLUS_SPEC CC1_SPEC /* Provide a LINK_SPEC appropriate for Linux. Here we provide support for the special GCC options -static and -shared, which allow us to Index: pic.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/pic.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- pic.h 26 Jul 2000 23:17:06 -0000 1.1 +++ pic.h 19 Oct 2002 11:33:39 -0000 1.1.2.1 @@ -243,6 +243,17 @@ * vax_print_operand_address (FILE, ADDR) */ +/* Put relocations in the constant pool in the writable data section. */ +#undef SELECT_RTX_SECTION +#define SELECT_RTX_SECTION(MODE,RTX) \ +{ \ + if (flag_pic && vax_symbolic_operand ((RTX), (MODE))) \ + data_section (); \ + else \ + readonly_data_section (); \ +} + + /* externals */ extern void function_prologue (); Index: vax.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.h,v retrieving revision 2.17.2.4 retrieving revision 2.17.2.5 diff -u -r2.17.2.4 -r2.17.2.5 --- vax.h 17 Oct 2002 13:17:21 -0000 2.17.2.4 +++ vax.h 19 Oct 2002 11:33:39 -0000 2.17.2.5 @@ -375,8 +375,7 @@ /* Given an rtx for the address of a frame, return an rtx for the address of the word in the frame that holds the dynamic chain--the previous frame's address. */ -#define DYNAMIC_CHAIN_ADDRESS(frame) \ -gen_rtx (PLUS, Pmode, frame, GEN_INT (12)) +#define DYNAMIC_CHAIN_ADDRESS(FRAME) plus_constant ((FRAME), 12) /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. @@ -671,22 +670,23 @@ /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */ #define REG_OK_FOR_BASE_P(X) 1 -/*#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X, 0)*/ -/*#define GO_IF_LEGITIMATE_ADDRESS(ZMODE, XOP, LABEL) \ +#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X, 0) +#define GO_IF_LEGITIMATE_ADDRESS(ZMODE, XOP, LABEL) \ do { if (legitimate_address_p(ZMODE, XOP, 0)) goto LABEL; } while (0) -*/ + #else /* Nonzero if X is a hard reg that can be used as an index. */ #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) /* Nonzero if X is a hard reg that can be used as a base reg. */ #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) -/*#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X, 1)*/ -/*#define GO_IF_LEGITIMATE_ADDRESS(ZMODE, XOP, LABEL) \ +#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X, 1) +#define GO_IF_LEGITIMATE_ADDRESS(ZMODE, XOP, LABEL) \ do { if (legitimate_address_p(ZMODE, XOP, 1)) goto LABEL; } while (0) -*/ + #endif +#if 0 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression @@ -827,6 +827,7 @@ && REG_OK_FOR_BASE_P (XEXP (X, 0))) \ goto ADDR; \ GO_IF_REG_PLUS_INDEX (XEXP (X, 0), MODE, ADDR); } } } +#endif /* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. Index: vax.md =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.md,v retrieving revision 2.12.2.3 retrieving revision 2.12.2.4 diff -u -r2.12.2.3 -r2.12.2.4 --- vax.md 9 Oct 2002 15:50:34 -0000 2.12.2.3 +++ vax.md 19 Oct 2002 11:33:39 -0000 2.12.2.4 @@ -225,7 +225,31 @@ ;; Loads of constants between 64 and 128 used to be done with ;; "addl3 $63,#,dst" but this is slower than movzbl and takes as much space. -(define_insn "movsi" +(define_expand "movsi" + [(set (match_operand:SI 0 "nonimmediate_operand" "") + (match_operand:SI 1 "general_operand" ""))] + "" + " +{ + if (GET_CODE (operands[1]) == CONST && + GET_CODE (XEXP (operands[1], 0)) == PLUS && + GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == SYMBOL_REF && +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + (!flag_pic || !SYMBOL_REF_FLAG (XEXP (XEXP (operands[1], 0), 0))) && +#endif + GET_CODE (XEXP (XEXP (operands[1], 0), 1)) == CONST_INT) + { + rtx symbol_ref = XEXP (XEXP (operands[1], 0), 0); + rtx const_int = XEXP (XEXP (operands[1], 0), 1); + rtx temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, symbol_ref); + emit_move_insn (operands[0], + plus_constant_for_output (temp, INTVAL (const_int))); + DONE; + } +}") + +(define_insn "movgensi" [(set (match_operand:SI 0 "nonimmediate_operand" "=g") (match_operand:SI 1 "general_operand" "g"))] "" @@ -242,15 +266,21 @@ /* Make sure the reg hasn't been clobbered. */ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn)) return \"incl %0\"; - if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST) + if (GET_CODE (operands[1]) == SYMBOL_REF + || GET_CODE (operands[1]) == LABEL_REF + || GET_CODE (operands[1]) == CONST) { if (push_operand (operands[0], SImode)) return \"pushab %a1\"; return \"movab %a1,%0\"; } if (operands[1] == const0_rtx) - return \"clrl %0\"; - if ( ((GET_CODE (operands[1]) == CONST_INT) || (GET_CODE (operands[1]) == CONSTANT_P_RTX)) + { + if (push_operand (operands[0], SImode)) + return \"pushl %1\"; + return \"clrl %0\"; + } + if ( ((GET_CODE (operands[1]) == CONST_INT) || (GET_CODE (operands[1]) == CONSTANT_P_RTX)) && (unsigned) INTVAL (operands[1]) >= 64) { int i = INTVAL (operands[1]); @@ -1928,7 +1958,9 @@ (label_ref (match_operand 0 "" "")) (pc)))] "" - "jgtru %l0") + "* + OUTPUT_JUMP(\"jgtru %l0\", 0, \"jneq %l0\"); + ") (define_insn "blt" [(set (pc) @@ -1946,7 +1978,9 @@ (label_ref (match_operand 0 "" "")) (pc)))] "" - "jlssu %l0") + "* + OUTPUT_JUMP(\"jlssu %l0\", 0, 0); + ") (define_insn "bge" [(set (pc) @@ -1964,7 +1998,9 @@ (label_ref (match_operand 0 "" "")) (pc)))] "" - "jgequ %l0") + "* + OUTPUT_JUMP(\"jgequ %l0\", 0, 0); + ") (define_insn "ble" [(set (pc) @@ -1982,10 +2018,12 @@ (label_ref (match_operand 0 "" "")) (pc)))] "" - "jlequ %l0") + "* + OUTPUT_JUMP(\"jlequ %l0\", NULL, \"jeql %l0\"); + ") ;; Recognize reversed jumps. -(define_insn "" +(define_insn "*rbr" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" [(cc0) @@ -1993,7 +2031,19 @@ (pc) (label_ref (match_operand 1 "" ""))))] "" - "j%C0 %l1") ; %C0 negates condition + "* + if ((cc_status.flags & CC_NO_OVERFLOW) != 0) + { + if (GET_CODE (operands[0]) == LTU + || GET_CODE (operands[0]) == GEU) + fatal (\"Cannot reverse branch\"); + if (GET_CODE (operands[0]) == GTU) + return \"jeql %l0\"; + if (GET_CODE (operands[0]) == LEU) + return \"jneq %l0\"; + } + return \"j%C0 %l1\"; /* %C0 negates condition */ + ") ;; Recognize jbs, jlbs, jbc and jlbc instructions. Note that the operand ;; of jlbs and jlbc insns are SImode in the hardware. However, if it is @@ -2166,63 +2216,66 @@ ;; It is used in the call instruction as a byte, but in the addl2 as ;; a word. Since the only time we actually use it in the call instruction ;; is when it is a constant, SImode (for addl2) is the proper mode. -(define_insn "call_pop" +(define_expand "call_pop" + [(parallel [(call (match_operand:QI 0 "memory_operand" "") + (match_operand:SI 1 "const_int_operand" "")) + (set (reg:SI 14) + (plus:SI (reg:SI 14) + (match_operand:SI 3 "immediate_operand" "")))])] + "" + " +{ + if (INTVAL (operands[1]) > 255 * 4) + abort (); + operands[1] = GEN_INT ((INTVAL (operands[1]) + 3)/ 4); +}") + +(define_insn "*call_pop" [(call (match_operand:QI 0 "memory_operand" "m") (match_operand:SI 1 "const_int_operand" "n")) (set (reg:SI 14) (plus:SI (reg:SI 14) - (match_operand:SI 3 "immediate_operand" "i")))] + (match_operand:SI 2 "immediate_operand" "i")))] "" - "* - if (INTVAL (operands[1]) > 255 * 4) - /* Vax `calls' really uses only one byte of #args, so pop explicitly. */ - return \"calls $0,%0\;addl2 %1,sp\"; - operands[1] = GEN_INT ((INTVAL (operands[1]) + 3)/ 4); - return \"calls %1,%0\"; -") + "calls %1,%0") -(define_insn "call_value_pop" - [(set (match_operand 0 "" "=g") +(define_expand "call_value_pop" + [(parallel [(set (match_operand 0 "" "") + (call (match_operand:QI 1 "memory_operand" "") + (match_operand:SI 2 "const_int_operand" ""))) + (set (reg:SI 14) + (plus:SI (reg:SI 14) + (match_operand:SI 4 "immediate_operand" "")))])] + "" + " +{ + if (INTVAL (operands[2]) > 255 * 4) + abort (); + operands[2] = GEN_INT ((INTVAL (operands[2]) + 3)/ 4); +}") + +(define_insn "*call_value_pop" + [(set (match_operand 0 "" "") (call (match_operand:QI 1 "memory_operand" "m") (match_operand:SI 2 "const_int_operand" "n"))) (set (reg:SI 14) (plus:SI (reg:SI 14) - (match_operand:SI 4 "immediate_operand" "i")))] + (match_operand:SI 3 "immediate_operand" "i")))] "" - "* - if (INTVAL (operands[2]) > 255 * 4) - /* Vax `calls' really uses only one byte of #args, so pop explicitly. */ - return \"calls $0,%1\;addl2 %2,sp\"; - operands[2] = GEN_INT ((INTVAL (operands[2]) + 3)/ 4); - return \"calls %2,%1\"; -") + "calls %2,%1") -;; Define another set of these for the case of functions with no -;; operands. In that case, combine may simplify the adjustment of sp. -(define_insn "" +;; Define another set of these for the case of functions with no operands. +;; These will allow the optimizers to do a slightly better job. +(define_insn "call" [(call (match_operand:QI 0 "memory_operand" "m") - (match_operand:SI 1 "const_int_operand" "n")) - (set (reg:SI 14) (reg:SI 14))] + (const_int 0))] "" - "* - if (INTVAL (operands[1]) > 255 * 4) - /* Vax `calls' really uses only one byte of #args, so pop explicitly. */ - return \"calls $0,%0\;addl2 %1,sp\"; - operands[1] = GEN_INT ((INTVAL (operands[1]) + 3)/ 4); - return \"calls %1,%0\"; -") + "calls $0,%0") -(define_insn "" - [(set (match_operand 0 "" "=g") +(define_insn "call_value" + [(set (match_operand 0 "" "") (call (match_operand:QI 1 "memory_operand" "m") - (match_operand:SI 2 "const_int_operand" "n"))) - (set (reg:SI 14) (reg:SI 14))] + (const_int 0)))] "" - "* - if (INTVAL (operands[2]) > 255 * 4) - /* Vax `calls' really uses only one byte of #args, so pop explicitly. */ - return \"calls $0,%1\;addl2 %2,sp\"; - operands[2] = GEN_INT ((INTVAL (operands[2]) + 3)/ 4); - return \"calls %2,%1\"; -") + "calls $0,%1") ;; Call subroutine returning any type. |
From: Dave A. <ai...@us...> - 2002-10-17 13:17:24
|
Update of /cvsroot/linux-vax/tools/src/gcc/config/vax In directory usw-pr-cvs1:/tmp/cvs-serv8286/src/gcc/config/vax Modified Files: Tag: tools-linuxvax-dynamic-dev vax.c vax.h Log Message: DA: no need for JUMP in vax.h linux.h has it already.. vax.c merge complete.. Index: vax.c =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.c,v retrieving revision 2.12.2.1 retrieving revision 2.12.2.2 diff -u -r2.12.2.1 -r2.12.2.2 --- vax.c 12 Oct 2002 11:41:55 -0000 2.12.2.1 +++ vax.c 17 Oct 2002 13:17:21 -0000 2.12.2.2 @@ -80,6 +80,22 @@ register rtx reg1, breg, ireg; rtx offset; rtx orig_addr = addr; + +#if 0 + if (GET_CODE (addr) == PLUS && GET_CODE (XEXP (addr, 1)) == CONST) + debug_rtx (addr); +#endif +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + if (flag_pic && GET_CODE (addr) == CONST && + GET_CODE (XEXP (addr, 0)) == PLUS && + GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF && + !SYMBOL_REF_FLAG (XEXP (XEXP (addr, 0), 0)) && + GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT) + { + fatal_insn ("Non-PIC operand escaped:\n", addr); + } +#endif + retry: switch (GET_CODE (addr)) { @@ -238,6 +254,16 @@ } ireg = XEXP (addr, 1); } + else if (GET_CODE (addr) == SYMBOL_REF) + { + output_addr_const (file, addr); + if (offset != 0) + { + fputc ('+', file); + output_address (offset); + offset = 0; + } + } else { debug_rtx (orig_addr); @@ -253,7 +279,12 @@ /* If REG1 is non-zero, figure out if it is a base or index register. */ if (reg1) { - if (breg != 0 || (offset && GET_CODE (offset) == MEM)) + if (breg != 0 + || GET_CODE (addr) == SYMBOL_REF + || (offset + && (GET_CODE (offset) == MEM + || GET_CODE (offset) == SYMBOL_REF + || GET_CODE (offset) == CONST))) { if (ireg) { @@ -709,6 +740,338 @@ } return 0; +} + +/* Nonzero if X is a hard reg that can be used as an index. */ +#define XREG_OK_FOR_INDEX_P(X, STRICT) (!(STRICT) || REGNO_OK_FOR_INDEX_P (REGNO (X))) +/* Nonzero if X is a hard reg that can be used as a base reg. */ +#define XREG_OK_FOR_BASE_P(X, STRICT) (!(STRICT) || REGNO_OK_FOR_BASE_P (REGNO (X))) + +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + +/* Re-definition of CONSTANT_ADDRESS_P, which is true only when there + are no SYMBOL_REFs for external symbols present and allow valid + addressing modes. */ + +#define INDIRECTABLE_CONSTANT_ADDRESS_P(X, INDEXED, INDIRECT) \ + (GET_CODE (X) == LABEL_REF \ + || (!INDEXED && GET_CODE (X) == SYMBOL_REF \ + && (!INDIRECT || SYMBOL_REF_FLAG (X))) \ + || (!INDEXED && GET_CODE (X) == CONST \ + && GET_CODE (XEXP ((X), 0)) == PLUS \ + && GET_CODE (XEXP (XEXP ((X), 0), 0)) == SYMBOL_REF \ + && ((!INDIRECT && !flag_pic) \ + || SYMBOL_REF_FLAG (XEXP (XEXP ((X), 0), 0)))) \ + || GET_CODE (X) == CONST_INT) + +/* Non-zero if X is an address which can be indirected. External symbols + could be in a sharable image library, so we disallow those. */ + +#define INDIRECTABLE_ADDRESS_P(X, STRICT, INDEXED, INDIRECT) \ + (INDIRECTABLE_CONSTANT_ADDRESS_P (X, INDEXED, INDIRECT) \ + || (GET_CODE (X) == REG && XREG_OK_FOR_BASE_P (X, STRICT)) \ + || (GET_CODE (X) == PLUS \ + && GET_CODE (XEXP (X, 0)) == REG \ + && XREG_OK_FOR_BASE_P (XEXP (X, 0), STRICT) \ + && GET_CODE (XEXP (X, 1)) != SYMBOL_REF \ + && !(GET_CODE (XEXP (X, 1)) == CONST \ + && GET_CODE (XEXP (XEXP (X, 1), 0)) == PLUS \ + && GET_CODE (XEXP (XEXP (XEXP (X, 1), 0), 0)) == SYMBOL_REF) \ + && INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1), INDEXED, INDIRECT))) + +#else /* not NO_EXTERNAL_INDIRECT_ADDRESS */ + +#define INDIRECTABLE_CONSTANT_ADDRESS_P(X, INDEXED, INDIRECT) \ + CONSTANT_ADDRESS_P (X) + +/* Non-zero if X is an address which can be indirected. */ +#define INDIRECTABLE_ADDRESS_P(X, STRICT, INDEXED, INDIRECT) \ + (INDIRECTABLE_CONSTANT_ADDRESS_P (X, INDEXED, INDIRECT) \ + || (GET_CODE (X) == REG && XREG_OK_FOR_BASE_P (X, STRICT)) \ + || (GET_CODE (X) == PLUS \ + && GET_CODE (XEXP (X, 0)) == REG \ + && XREG_OK_FOR_BASE_P (XEXP (X, 0), STRICT) \ + && CONSTANT_ADDRESS_P (XEXP (X, 1)))) + +#endif /* not NO_EXTERNAL_INDIRECT_ADDRESS */ + +/* Go to ADDR if X is a valid address not using indexing. + (This much is the easy part.) */ +#define GO_IF_NONINDEXED_ADDRESS(X, ADDR, STRICT, INDEXED) \ +{ register rtx xfoob = (X); \ + if (GET_CODE (X) == REG) \ + { \ + extern rtx *reg_equiv_mem; \ + if (! reload_in_progress) \ + goto ADDR; \ + if (!STRICT) \ + { \ + if ((xfoob = reg_equiv_mem[REGNO (xfoob)]) == 0) \ + goto ADDR; \ + } \ + if (INDIRECTABLE_ADDRESS_P (xfoob, STRICT, INDEXED, 0)) \ + goto ADDR; \ + } \ + if (INDIRECTABLE_CONSTANT_ADDRESS_P (X, INDEXED, 0)) goto ADDR; \ + if (INDIRECTABLE_ADDRESS_P (X, STRICT, INDEXED, 0)) goto ADDR; \ + xfoob = XEXP (X, 0); \ + if (GET_CODE (X) == MEM \ + && INDIRECTABLE_ADDRESS_P (xfoob, STRICT, INDEXED, !TARGET_INDIRECT)) \ + goto ADDR; \ + if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC) \ + && GET_CODE (xfoob) == REG \ + && XREG_OK_FOR_BASE_P (xfoob, STRICT)) \ + goto ADDR; } + +/* 1 if PROD is either a reg times size of mode MODE + or just a reg, if MODE is just one byte. + This macro's expansion uses the temporary variables xfoo0 and xfoo1 + that must be declared in the surrounding context. */ +#define INDEX_TERM_P(PROD, MODE, STRICT) \ +(GET_MODE_SIZE (MODE) == 1 \ + ? (GET_CODE (PROD) == REG && XREG_OK_FOR_BASE_P (PROD, STRICT)) \ + : (GET_CODE (PROD) == MULT \ + && \ + (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1), \ + ((GET_CODE (xfoo0) == CONST_INT \ + && GET_CODE (xfoo1) == REG \ + && INTVAL (xfoo0) == (int)GET_MODE_SIZE (MODE) \ + && XREG_OK_FOR_INDEX_P (xfoo1, STRICT)) \ + || \ + (GET_CODE (xfoo1) == CONST_INT \ + && GET_CODE (xfoo0) == REG \ + && INTVAL (xfoo1) == (int)GET_MODE_SIZE (MODE) \ + && XREG_OK_FOR_INDEX_P (xfoo0, STRICT)))))) + +/* Go to ADDR if X is the sum of a register + and a valid index term for mode MODE. */ +#define GO_IF_REG_PLUS_INDEX(X, MODE, ADDR, STRICT) \ +{ register rtx xfooa; \ + if (GET_CODE (X) == PLUS) \ + { if (GET_CODE (XEXP (X, 0)) == REG \ + && XREG_OK_FOR_BASE_P (XEXP (X, 0), STRICT) \ + && (xfooa = XEXP (X, 1), \ + INDEX_TERM_P (xfooa, MODE, STRICT))) \ + goto ADDR; \ + if (GET_CODE (XEXP (X, 1)) == REG \ + && XREG_OK_FOR_BASE_P (XEXP (X, 1), STRICT) \ + && (xfooa = XEXP (X, 0), \ + INDEX_TERM_P (xfooa, MODE, STRICT))) \ + goto ADDR; } } + +int +legitimate_pic_operand_p(x, strict) + register rtx x; + int strict ATTRIBUTE_UNUSED; +{ + if (GET_CODE (x) != SYMBOL_REF + && !(GET_CODE (x) == CONST + && GET_CODE (XEXP (x, 0)) == PLUS + && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF)) + { + return 1; + } + return 0; +} + +int +legitimate_address_p(mode, xbar, strict) + enum machine_mode mode; + register rtx xbar; + int strict; +{ + register rtx xfoo, xfoo0, xfoo1; + int from = __LINE__; + GO_IF_NONINDEXED_ADDRESS (xbar, win, strict, 0); + if (GET_CODE (xbar) == PLUS) + { + /* Handle <address>[index] represented with index-sum outermost */ + xfoo = XEXP (xbar, 0); + if (INDEX_TERM_P (xfoo, mode, strict)) + { + from = __LINE__; + GO_IF_NONINDEXED_ADDRESS (XEXP (xbar, 1), win, strict, 0); + } + xfoo = XEXP (xbar, 1); + if (INDEX_TERM_P (xfoo, mode, strict)) + { + from = __LINE__; + GO_IF_NONINDEXED_ADDRESS (XEXP (xbar, 0), win, strict, 0); + } + /* Handle offset(reg)[index] with offset added outermost */ + if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (xbar, 0), 1, 0)) + { + from = __LINE__; + if (GET_CODE (XEXP (xbar, 1)) == REG + && XREG_OK_FOR_BASE_P (XEXP (xbar, 1), strict)) + goto win; + from = __LINE__; + GO_IF_REG_PLUS_INDEX (XEXP (xbar, 1), mode, win, strict); + } + if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (xbar, 1), 1, 0)) + { + from = __LINE__; + if (GET_CODE (XEXP (xbar, 0)) == REG + && XREG_OK_FOR_BASE_P (XEXP (xbar, 0), strict)) + goto win; + from = __LINE__; + GO_IF_REG_PLUS_INDEX (XEXP (xbar, 0), mode, win, strict); + } + } + return 0; + + win: +#if 0 + if (strict) + { + fprintf(stderr, "line=%d\n", from); + debug_rtx (xbar); + } +#endif + if (flag_pic && GET_CODE (xbar) == SYMBOL_REF +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + && !SYMBOL_REF_FLAG (xbar) +#endif + && mode == DImode) + return 0; + return 1; +} + +int +vax_symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; +{ + if (!general_operand(op, mode)) + return 0; + if (GET_CODE (op) == SYMBOL_REF + || GET_CODE (op) == LABEL_REF + || (GET_CODE (op) == CONST + && GET_CODE (XEXP (op, 0)) == PLUS + && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + && (SYMBOL_REF_FLAG (XEXP (XEXP (op, 0), 0)) || !flag_pic) +#endif + && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) + || (GET_CODE (op) == PLUS + && GET_CODE (XEXP (op, 1)) == SYMBOL_REF +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + && (SYMBOL_REF_FLAG (XEXP (op, 1)) || !flag_pic) +#endif + && GET_CODE (XEXP (op, 0)) == CONST_INT) + || (GET_CODE (op) == PLUS + && GET_CODE (XEXP (op, 0)) == SYMBOL_REF +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + && (SYMBOL_REF_FLAG (XEXP (op, 0)) || !flag_pic) +#endif + && GET_CODE (XEXP (op, 1)) == CONST_INT)) + { + return 1; + } + return 0; +} + +int +vax_nonsymbolic_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; +{ + if (!general_operand(op, mode)) + return 0; + if (GET_CODE (op) == SYMBOL_REF + || GET_CODE (op) == LABEL_REF + || (GET_CODE (op) == CONST + && GET_CODE (XEXP (op, 0)) == PLUS + && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF) + || (GET_CODE (op) == MEM + && GET_CODE (XEXP (op, 0)) == CONST + && GET_CODE (XEXP (XEXP (op, 0), 0)) == PLUS + && GET_CODE (XEXP (XEXP (XEXP (op, 0), 0), 0)) == SYMBOL_REF) + || (GET_CODE (op) == PLUS + && GET_CODE (XEXP (op, 0)) == SYMBOL_REF + && GET_CODE (XEXP (op, 1)) == CONST_INT)) + return 0; +#if 0 + if (GET_CODE (op) == PLUS) + debug_rtx (op); +#endif + if (vax_symbolic_operand (op, mode)) + return 0; +#if 0 + if (GET_CODE (op) != CONST_INT && GET_CODE (op) != REG && + GET_CODE (op) != MEM) + debug_rtx (op); +#endif + return 1; +} + +int +vax_lvalue_operand(op, mode) + register rtx op; + enum machine_mode mode; +{ + if (!general_operand(op, mode)) + return 0; + return GET_CODE (op) == REG + || GET_CODE (op) == SUBREG + || GET_CODE (op) == MEM + || GET_CODE (op) == CONCAT + || GET_CODE (op) == PARALLEL + || GET_CODE (op) == STRICT_LOW_PART; +} + +int +vax_general_operand(op, mode) + register rtx op; + enum machine_mode mode; +{ + if (!general_operand(op, mode)) + return 0; + if (!flag_pic) + return 1; + if ((GET_CODE (op) == CONST + && GET_CODE (XEXP (op, 0)) == PLUS + && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + && !SYMBOL_REF_FLAG (XEXP (XEXP (op, 0), 0)) +#endif + ) || (GET_CODE (op) == MEM + && GET_CODE (XEXP (op, 0)) == CONST + && GET_CODE (XEXP (XEXP (op, 0), 0)) == PLUS + && GET_CODE (XEXP (XEXP (XEXP (op, 0), 0), 0)) == SYMBOL_REF +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + && !SYMBOL_REF_FLAG (XEXP (XEXP (op, 0), 0)) +#endif + ) || (GET_CODE (op) == PLUS + && GET_CODE (XEXP (op, 0)) == SYMBOL_REF + && GET_CODE (XEXP (op, 1)) == CONST_INT +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + && !SYMBOL_REF_FLAG (XEXP (op, 0)) +#endif + )) + return 0; +#if 0 + debug_rtx (op); +#endif + return 1; +} + +int +vax_reg_used_p(operand, reg) + rtx operand; + int reg; +{ + if (GET_CODE (operand) == REG && REGNO (operand) == reg) + return 1; + if (GET_CODE (operand) == MEM || + GET_CODE (operand) == PRE_DEC || + GET_CODE (operand) == POST_DEC) + return vax_reg_used_p (XEXP(operand, 0), reg); + if (GET_CODE (operand) == PLUS || + GET_CODE (operand) == MULT) + return vax_reg_used_p (XEXP(operand, 0), reg) || + vax_reg_used_p (XEXP(operand, 1), reg); + return 0; } #ifdef VMS_TARGET Index: vax.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.h,v retrieving revision 2.17.2.3 retrieving revision 2.17.2.4 diff -u -r2.17.2.3 -r2.17.2.4 --- vax.h 17 Oct 2002 12:50:00 -0000 2.17.2.3 +++ vax.h 17 Oct 2002 13:17:21 -0000 2.17.2.4 @@ -878,10 +878,6 @@ jumps to the default label instead. */ #define CASE_DROPS_THROUGH -/* Indicate that jump tables go in the text section. This is - necessary when compiling PIC code. */ -#define JUMP_TABLES_IN_TEXT_SECTION 1 - /* Specify the tree operation to be used to convert reals to integers. */ #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR |
From: Dave A. <ai...@us...> - 2002-10-17 12:50:07
|
Update of /cvsroot/linux-vax/tools/src/gcc/config/vax In directory usw-pr-cvs1:/tmp/cvs-serv30713 Modified Files: Tag: tools-linuxvax-dynamic-dev vax.h Log Message: DA: some more merges from NetBSD.. Index: vax.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.h,v retrieving revision 2.17.2.2 retrieving revision 2.17.2.3 diff -u -r2.17.2.2 -r2.17.2.3 --- vax.h 12 Oct 2002 12:15:29 -0000 2.17.2.2 +++ vax.h 17 Oct 2002 12:50:00 -0000 2.17.2.3 @@ -25,7 +25,7 @@ /* If using g-format floating point, alter math.h. */ -#define CPP_SPEC "%{mg:-DGFLOAT}" +#define CPP_SPEC "%{mg:%{!ansi:-DGFLOAT} -D__GFLOAT}" /* Choose proper libraries depending on float format. Note that there are no profiling libraries for g-format. @@ -73,13 +73,15 @@ An empty string NAME is used to identify the default VALUE. */ #define TARGET_SWITCHES \ - { {"unix", 1, "Do not output long jump instructions that old versions of as cant handle"}, \ - {"gnu", -1, "Do output long jump instructions, as we are using gas"}, \ - {"vaxc-alignment", 2, "keep same alignment as VAX C"}, \ - {"g", 4, "output code for g floating point code not d float"}, \ - {"g-float", 4, "output code for g floating point code not d float"}, \ - {"d", -4, "output code for d floating point code not g float"}, \ - {"d-float", -4, "output code for d floating point code not g float"}, \ + { {"unix", MASK_UNIX_ASM, "Do not output long jump instructions that old versions of as cant handle"}, \ + {"gnu", -MASK_UNIX_ASM, "Do output long jump instructions, as we are using gas"}, \ + {"vaxc-alignment", MASK_VAXC_ALIGNMENT, "keep same alignment as VAX C"}, \ + {"g", MASK_G_FLOAT, "output code for g floating point code not d float"}, \ + {"g-float", MASK_G_FLOAT, "output code for g floating point code not d float"}, \ + {"d", -MASK_G_FLOAT, "output code for d floating point code not g float"}, \ + {"d-float", -MASK_G_FLOAT, "output code for d floating point code not g float"}, \ + {"indirect", MASK_INDIRECT, "Allow indirect memory references in PIC code"}, \ + {"no-indirect", -MASK_INDIRECT, "Disallow indirect memory references in PIC code"}, \ { "", TARGET_DEFAULT, ""}} /* Default target_flags if no switches specified. */ @@ -290,16 +292,28 @@ #define REG_CLASS_FROM_LETTER(C) NO_REGS -/* The letters I, J, K, L and M in a register constraint string +/* The letters I, J, K, L, M, N, and O in a register constraint string can be used to stand for particular ranges of immediate operands. This macro defines what the ranges are. C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. - `I' is the constant zero. */ - -#define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'I' ? (VALUE) == 0 \ + `I' is the constant zero. + `J' is a value between 0 .. 63 (inclusive) S^# + `K' is a value between -128 and 127 (inclusive) B^ + 'L' is a value between -32768 and 32767 (include) W^ + `M' is a value between 0 and 255 (inclusive) B^ + 'N' is a value between 0 and 65535 (inclusive) W^ + `O' is a value between -63 and -1 (inclusive) */ + +#define CONST_OK_FOR_LETTER_P(VALUE, C) \ + ( (C) == 'I' ? (VALUE) == 0 \ + : (C) == 'J' ? 0 <= (VALUE) && (VALUE) < 64 \ + : (C) == 'O' ? -63 <= (VALUE) && (VALUE) < 0 \ + : (C) == 'K' ? -128 <= (VALUE) && (VALUE) < 128 \ + : (C) == 'M' ? 0 <= (VALUE) && (VALUE) < 256 \ + : (C) == 'L' ? -32768 <= (VALUE) && (VALUE) < 32768 \ + : (C) == 'N' ? 0 <= (VALUE) && (VALUE) < 65536 \ : 0) /* Similar, but for floating constants, and defining letters G and H. @@ -567,12 +581,15 @@ FNADDR is an RTX for the address of the function's pure code. CXT is an RTX for the static chain value for the function. */ +/* This is separated out so register prefixes can be added by a target + if it requires them */ +#define VAX_ISTREAM_SYNC "movpsl -(sp)\n\tpushal 1(pc)\n\trei" + /* We copy the register-mask from the function's pure code to the start of the trampoline. */ #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ - emit_insn (gen_rtx (ASM_INPUT, VOIDmode, \ - "movpsl -(sp)\n\tpushal 1(pc)\n\trei")); \ + emit_insn (gen_rtx (ASM_INPUT, VOIDmode, VAX_ISTREAM_SYNC)); \ emit_move_insn (gen_rtx (MEM, HImode, TRAMP), \ gen_rtx (MEM, HImode, FNADDR)); \ emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 4)), CXT);\ @@ -839,8 +856,10 @@ goto LABEL; \ if (GET_CODE (ADDR) == PLUS) \ { if (CONSTANT_ADDRESS_P (XEXP (ADDR, 0)) \ + && (!flag_pic || GET_CODE (XEXP (ADDR, 0)) != SYMBOL_REF) \ && GET_CODE (XEXP (ADDR, 1)) == REG); \ else if (CONSTANT_ADDRESS_P (XEXP (ADDR, 1)) \ + && (!flag_pic || GET_CODE (XEXP (ADDR, 1)) != SYMBOL_REF) \ && GET_CODE (XEXP (ADDR, 0)) == REG); \ else goto LABEL; }} @@ -859,6 +878,10 @@ jumps to the default label instead. */ #define CASE_DROPS_THROUGH +/* Indicate that jump tables go in the text section. This is + necessary when compiling PIC code. */ +#define JUMP_TABLES_IN_TEXT_SECTION 1 + /* Specify the tree operation to be used to convert reals to integers. */ #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR @@ -992,6 +1015,36 @@ #define MIN_G_FLOAT .556268464626800e-308 */ +/* Optionally define this if you have added predicates to + `MACHINE.c'. This macro is called within an initializer of an + array of structures. The first field in the structure is the + name of a predicate and the second field is an array of rtl + codes. For each predicate, list all rtl codes that can be in + expressions matched by the predicate. The list should have a + trailing comma. Here is an example of two entries in the list + for a typical RISC machine: + + #define PREDICATE_CODES \ + {"gen_reg_rtx_operand", {SUBREG, REG}}, \ + {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}}, + + Defining this macro does not affect the generated code (however, + incorrect definitions that omit an rtl code that may be matched + by the predicate can cause the compiler to malfunction). + Instead, it allows the table built by `genrecog' to be more + compact and efficient, thus speeding up the compiler. The most + important predicates to include in the list specified by this + macro are thoses used in the most insn patterns. */ + +#define PREDICATE_CODES \ + {"vax_symbolic_operand", { SYMBOL_REF, LABEL_REF, CONST, PLUS }},\ + {"vax_lvalue_operand", { REG, SUBREG, MEM, CONCAT, PARALLEL, \ + STRICT_LOW_PART }}, \ + {"vax_nonsymbolic_operand", { CONST_INT, CONST_DOUBLE, SUBREG, REG, \ + MEM }}, \ + {"vax_general_operand", { CONST_INT, CONST_DOUBLE, SUBREG, REG, \ + MEM, SYMBOL_REF, LABEL_REF, CONST, PLUS }}, + /* Tell final.c how to eliminate redundant test instructions. */ /* Here we define machine-dependent flags and fields in cc_status @@ -1006,9 +1059,15 @@ { if (GET_CODE (EXP) == SET) \ { if (GET_CODE (SET_SRC (EXP)) == CALL) \ CC_STATUS_INIT; \ + else if (GET_CODE (SET_SRC (EXP)) == COMPARE \ + || GET_CODE (SET_SRC (EXP)) == PLUS \ + || GET_CODE (SET_SRC (EXP)) == MINUS) \ + { cc_status.flags = 0; \ + cc_status.value1 = SET_DEST (EXP); \ + cc_status.value2 = SET_SRC (EXP); } \ else if (GET_CODE (SET_DEST (EXP)) != ZERO_EXTRACT \ && GET_CODE (SET_DEST (EXP)) != PC) \ - { cc_status.flags = 0; \ + { cc_status.flags = CC_NO_OVERFLOW; \ cc_status.value1 = SET_DEST (EXP); \ cc_status.value2 = SET_SRC (EXP); } } \ else if (GET_CODE (EXP) == PARALLEL \ @@ -1017,7 +1076,7 @@ if (GET_CODE (SET_SRC (XVECEXP (EXP, 0, 0))) == CALL) \ CC_STATUS_INIT; \ else if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) != PC) \ - { cc_status.flags = 0; \ + { cc_status.flags = CC_NO_OVERFLOW; \ cc_status.value1 = SET_DEST (XVECEXP (EXP, 0, 0)); \ cc_status.value2 = SET_SRC (XVECEXP (EXP, 0, 0)); } \ else \ |
From: Dave A. <ai...@us...> - 2002-10-13 12:59:37
|
Update of /cvsroot/linux-vax/tools/src/gcc In directory usw-pr-cvs1:/tmp/cvs-serv23364 Modified Files: Tag: tools-linuxvax-dynamic-dev version.c Log Message: DA: change version in gcc to somethnig more useful Index: version.c =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/version.c,v retrieving revision 2.13 retrieving revision 2.13.2.1 diff -u -r2.13 -r2.13.2.1 --- version.c 31 Dec 2000 16:01:55 -0000 2.13 +++ version.c 13 Oct 2002 12:59:30 -0000 2.13.2.1 @@ -1 +1 @@ -char *version_string = "2.95.2-linuxvax-20001231 (release)"; +char *version_string = "2.95.2-linuxvax-dynamic-dev (CVS)"; |